В ядре Linux устранена следующая уязвимость:
nfsd: исправлена утечка ссылки на nfsd_file в nfsd4_add_rdaccess_to_wrdeleg().
nfsd4_add_rdaccess_to_wrdeleg() безоговорочно перезаписывает
fp->fi_fds[O_RDONLY] с недавно полученным файлом nfsd_file. Однако, если
у клиента уже есть открытый SHARE_ACCESS_READ из предыдущего OPEN
операция, это действие перезаписывает существующий указатель без
освобождая свою ссылку, делая потерянной предыдущую ссылку. Кроме того, функция изначально хранила тот же файл nfsd_file.
указатель как в fp->fi_fds[O_RDONLY], так и в fp->fi_rdeleg_file с
только одна ссылка.
Когда put_deleg_file() запускается, он очищает
fi_rdeleg_file и вызывает nfs4_file_put_access(), чтобы освободить файл. Однако nfs4_file_put_access() освобождает fi_fds[O_RDONLY] только тогда, когда
счетчик fi_access[O_RDONLY] падает до нуля. Если откроется еще одно ЧТЕНИЕ
существует в файле, счетчик остается повышенным, а файл nfsd_file
Справка от делегации никогда не публикуется.
Это потенциально
вызывает открытые конфликты в этом файле. Затем при выключении сервера эти утечки вызывают __nfsd_file_cache_purge().
встречать файлы с повышенным счетчиком ссылок, которые невозможно
очищено, что в конечном итоге вызывает BUG() в kmem_cache_destroy()
потому что в этом кэше все еще есть объекты nfsd_file.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: nfsd: fix nfsd_file reference leak in nfsd4_add_rdaccess_to_wrdeleg() nfsd4_add_rdaccess_to_wrdeleg() unconditionally overwrites fp->fi_fds[O_RDONLY] with a newly acquired nfsd_file. However, if the client already has a SHARE_ACCESS_READ open from a previous OPEN operation, this action overwrites the existing pointer without releasing its reference, orphaning the previous reference. Additionally, the function originally stored the same nfsd_file pointer in both fp->fi_fds[O_RDONLY] and fp->fi_rdeleg_file with only a single reference. When put_deleg_file() runs, it clears fi_rdeleg_file and calls nfs4_file_put_access() to release the file. However, nfs4_file_put_access() only releases fi_fds[O_RDONLY] when the fi_access[O_RDONLY] counter drops to zero. If another READ open exists on the file, the counter remains elevated and the nfsd_file reference from the delegation is never released. This potentially causes open conflicts on that file. Then, on server shutdown, these leaks cause __nfsd_file_cache_purge() to encounter files with an elevated reference count that cannot be cleaned up, ultimately triggering a BUG() in kmem_cache_destroy() because there are still nfsd_file objects allocated in that cache.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 10
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.17.1
|
6.18.4
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc7:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc8:*:*:*:*:*:*
|
— | — |