Версии DBI перед 1.656 for Perl терпят крах из-за путаницы типа в dbi_profile, когда обработчик базы данных уничтожается под Profile Path с элементом attr. Элемент attr именует атрибут обработчика базы данных, который dbi_profile считывает из внутреннего хэша обработчика. Он ожидает внутреннюю ручку в качестве ссылки и удаляет ее, но ручка, которая разрушается, возвращает сам внутренний хеш, поэтому удаление дает массив ковша хеша.
Проверка типа этого указателя обычно терпит неудачу, и вызов остается непрофилированным. Когда память, к которой он обращается, проходит проверку, поиск атрибута удаляет указатель NULL или некорректный указатель, и процесс умирает на SIGSEGV. Путь задается приложением, атрибутом Profile handle или переменной окружения DBI_PROFILE, так что DBI_PROFILE={ImplementorClass может привести к сбою немодифицированной программы.
Показать оригинальное описание (EN)
DBI versions before 1.656 for Perl crash via type confusion in dbi_profile when a database handle is destroyed under a Profile Path with an {attr} element. An {attr} element names a database handle attribute, which dbi_profile reads from the handle's inner hash. It expects the inner handle as a reference and dereferences it, but a handle that is being destroyed hands back the inner hash itself, so the dereference yields the hash's bucket array. A type check on that pointer usually fails and the call goes unprofiled. When the memory it addresses passes the check, the attribute lookup dereferences a NULL or invalid pointer and the process dies on SIGSEGV. The Path is set by the application, by the Profile handle attribute, or by the DBI_PROFILE environment variable, so `DBI_PROFILE={ImplementorClass}` can crash an unmodified program.
Характеристики атаки
Последствия
Строка CVSS v3.1