Уязвимость "использования после освобождения" в OpenPrinting CUPS из-за некорректного логирования данных памяти
Описание
OpenPrinting CUPS — это система печати с открытым исходным кодом, основанная на стандартах, для Linux и других Unix-подобных операционных систем. Начиная с версии 2.0.0 и до версии 2.4.6, CUPS выполняет логирование данных о свободной памяти в службу логирования ПОСЛЕ закрытия соединения, тогда как данные должны были быть записаны непосредственно перед этим. Это является ошибкой "использования после освобождения" (use-after-free), которая влияет на весь процесс cupsd
.
Точная причина проблемы заключается в вызове функции httpClose(con->http)
в файле scheduler/client.c
. Проблема состоит в том, что функция httpClose
всегда освобождает указатель в конце вызова, если её аргумент не равен null
. Однако функция cupsdLogClient
передаёт этот указатель в httpGetHostname
, что приводит к ошибке. Данная проблема возникает в функции cupsdAcceptClient
, если уровень логирования (LogLevel
) установлен как warn
или выше, и в двух сценариях:
- При двойном поиске IP-адреса (если в конфигурации
cupsd.conf
установлено значениеHostNameLookups Double
), который завершается неудачей. - Если CUPS скомпилирован с поддержкой TCP wrappers, и соединение отклоняется правилами из
/etc/hosts.allow
и/etc/hosts.deny
.
Затронутые версии ПО
- OpenPrinting CUPS >= 2.0.0, < 2.4.6
Тип уязвимости
Использование после освобождения (use-after-free)
Ссылки
- Mailing ListThird Party Advisory
- Mailing ListThird Party Advisory
- Patch
- Release Notes
- ExploitPatchVendor Advisory
- Mailing List
- Mailing List
- Mailing ListThird Party Advisory
- Third Party Advisory
- Third Party Advisory
- Third Party Advisory
- Mailing ListThird Party Advisory
- Mailing ListThird Party Advisory
- Patch
- Release Notes
- ExploitPatchVendor Advisory
- Mailing List
- Mailing List
- Mailing ListThird Party Advisory
- Third Party Advisory
Уязвимые конфигурации
Одно из
Одно из
EPSS
5.3 Medium
CVSS3
7.1 High
CVSS3
Дефекты
Связанные уязвимости
OpenPrinting CUPS is a standards-based, open source printing system for Linux and other Unix-like operating systems. Starting in version 2.0.0 and prior to version 2.4.6, CUPS logs data of free memory to the logging service AFTER the connection has been closed, when it should have logged the data right before. This is a use-after-free bug that impacts the entire cupsd process. The exact cause of this issue is the function `httpClose(con->http)` being called in `scheduler/client.c`. The problem is that httpClose always, provided its argument is not null, frees the pointer at the end of the call, only for cupsdLogClient to pass the pointer to httpGetHostname. This issue happens in function `cupsdAcceptClient` if LogLevel is warn or higher and in two scenarios: there is a double-lookup for the IP Address (HostNameLookups Double is set in `cupsd.conf`) which fails to resolve, or if CUPS is compiled with TCP wrappers and the connection is refused by rules from `/etc/hosts.allow` and `/et...
OpenPrinting CUPS is a standards-based, open source printing system for Linux and other Unix-like operating systems. Starting in version 2.0.0 and prior to version 2.4.6, CUPS logs data of free memory to the logging service AFTER the connection has been closed, when it should have logged the data right before. This is a use-after-free bug that impacts the entire cupsd process. The exact cause of this issue is the function `httpClose(con->http)` being called in `scheduler/client.c`. The problem is that httpClose always, provided its argument is not null, frees the pointer at the end of the call, only for cupsdLogClient to pass the pointer to httpGetHostname. This issue happens in function `cupsdAcceptClient` if LogLevel is warn or higher and in two scenarios: there is a double-lookup for the IP Address (HostNameLookups Double is set in `cupsd.conf`) which fails to resolve, or if CUPS is compiled with TCP wrappers and the connection is refused by rules from `/etc/hosts.allow` and `/et...
OpenPrinting CUPS is a standards-based, open source printing system fo ...
EPSS
5.3 Medium
CVSS3
7.1 High
CVSS3