В ядре Linux устранена следующая уязвимость:
cifs: исправлена утечка cifsFileInfo при сбое kmalloc в путях отложенного закрытия. В cifs_close_deferred_file(), cifs_close_all_deferred_files() и
cifs_close_deferred_file_under_dentry(), когда ожидается отложенное закрытие
отменяется с помощью cancel_delayed_work(), последующий вызов kmalloc_obj() на
добавление файла в список локальной обработки может привести к сбою из-за нехватки памяти. Цикл немедленно прерывается, но отмененная работа больше не ожидает выполнения.
(это вызвало бы _cifsFileInfo_put()), а cfile никогда не добавляется
в file_head для обработки.
Ссылка cifsFileInfo и открытая
сервер обрабатывает обе утечки. Исправьте это, сохранив файл cfile, который не удалось выделить, в локальную переменную.
ломаемся, как раньше, и вызываем для него _cifsFileInfo_put() после
отпускание замка. Любые файлы, находящиеся позже в итерации, не затрагиваются.
поскольку их отложенная работа все еще не завершена и будет работать нормально.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: cifs: fix cifsFileInfo leak on kmalloc failure in deferred close drain paths In cifs_close_deferred_file(), cifs_close_all_deferred_files(), and cifs_close_deferred_file_under_dentry(), when a pending deferred close is cancelled via cancel_delayed_work(), the subsequent kmalloc_obj() to add the file to the local processing list may fail under memory pressure. The loop breaks immediately, but the cancelled work is no longer pending (it would have called _cifsFileInfo_put()), and the cfile is never added to file_head for processing. The cifsFileInfo reference and the open server handle both leak. Fix by saving the cfile that failed allocation in a local variable, breaking as before, and calling _cifsFileInfo_put() on it after releasing the lock. Any files later in the iteration are unaffected since their deferred work is still pending and will fire normally.
Уязвимые продукты 2
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.15
|
7.1.6
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.15
|
7.2
|