В ядре Linux устранена следующая уязвимость:
io_uring: исправлена утечка имени файла в __io_openat_prep()
__io_openat_prep() выделяет имя файла структуры с помощью getname(). Однако,
для состояния устанавливаемого файла в фиксированной таблице файлов как
а также если установлен флаг O_CLOEXEC, функция возвращается раньше. При этом
точка, в запросе не установлен флаг REQ_F_NEED_CLEANUP.
В связи с этим,
память для вновь выделенного имени файла структуры не очищается,
вызывая утечку памяти. Исправьте это, установив REQ_F_NEED_CLEANUP для запроса сразу после
успешный вызов getname(), чтобы при удалении запроса
имя файла будет очищено вместе с другими ресурсами, нуждающимися в очистке.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: io_uring: fix filename leak in __io_openat_prep() __io_openat_prep() allocates a struct filename using getname(). However, for the condition of the file being installed in the fixed file table as well as having O_CLOEXEC flag set, the function returns early. At that point, the request doesn't have REQ_F_NEED_CLEANUP flag set. Due to this, the memory for the newly allocated struct filename is not cleaned up, causing a memory leak. Fix this by setting the REQ_F_NEED_CLEANUP for the request just after the successful getname() call, so that when the request is torn down, the filename will be cleaned up, along with other resources needing cleanup.