В ядре Linux устранена следующая уязвимость:
fs/xattr: отсутствует fdput() в пути ошибки fremovexattr
В ядре Linux системный вызов fremovexattr() вызывает функцию fdget() для получения
ссылку на файл, но возвращает раньше, не вызывая fdput(), когда
strncpy_from_user() не работает с аргументом имени. В многопоточных процессах
где fdget() выбирает медленный путь, это постоянно пропускает один
ссылка на файл для каждого вызова, закрепление файла структуры и связанного ядра
объекты в памяти. Непривилегированный локальный пользователь может воспользоваться этим, чтобы вызвать
исчерпание памяти ядра.
Проблема была случайно исправлена коммитом a71874379ec8 («xattr: переключиться на CLASS(fd)»).
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: fs/xattr: missing fdput() in fremovexattr error path In the Linux kernel, the fremovexattr() syscall calls fdget() to acquire a file reference but returns early without calling fdput() when strncpy_from_user() fails on the name argument. In multi-threaded processes where fdget() takes the slow path, this permanently leaks one file reference per call, pinning the struct file and associated kernel objects in memory. An unprivileged local user can exploit this to cause kernel memory exhaustion. The issue was inadvertently fixed by commit a71874379ec8 ("xattr: switch to CLASS(fd)").