В ядре Linux устранена следующая уязвимость:
nfsd: исправлен UAF fcache_disposal путем встраивания состояния удаления в nfsd_net.
nfsd_file_dispose_list_delayed() откладывает fput() на потоки службы nfsd
через очередь Freeme для каждой сети, что предотвращает возможность сжатия и работы GC.
расходы на закрытие файлов (см. ffb402596147). Однако
очередь находится в отдельно выделенной структуре nfsd_fcache_disposal, которая
освобождается с помощью nfsd_free_fcache_disposal_net() во время демонтажа каждой сети. Обратные вызовы глобального сжатия, прачечной и fsnotify по-прежнему могут быть
внутри nfsd_file_dispose_list_delayed() разыменовывая этот указатель,
вызывая использование после бесплатного использования.
Встройте спин-блокировку и список freeme непосредственно в структуру nfsd_net (как
fcache_dispose_lock и fcache_dispose_list), исключив отдельные
полностью выделил структуру nfsd_fcache_disposal. Эти поля теперь имеют
то же время жизни, что и само сетевое пространство имен, поэтому нет висячих
указатель для погони.
nfsd_file_cache_start_net() теперь просто инициализирует встроенные поля и
не может потерпеть неудачу из-за распределения. nfsd_file_cache_shutdown_net() сливает
встроенный список напрямую вместо освобождения отдельной структуры. Помощники alloc/free удалены.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: nfsd: fix fcache_disposal UAF by inlining dispose state into nfsd_net nfsd_file_dispose_list_delayed() defers fput() to nfsd service threads via a per-net freeme queue, preventing the shrinker and GC worker from bearing the cost of closing files (see ffb402596147). However, the queue lives in a separately-allocated struct nfsd_fcache_disposal that is freed by nfsd_free_fcache_disposal_net() during per-net teardown. The global shrinker, laundrette, and fsnotify callbacks can still be inside nfsd_file_dispose_list_delayed() dereferencing that pointer, causing a use-after-free. Inline the spinlock and freeme list directly into struct nfsd_net (as fcache_dispose_lock and fcache_dispose_list), eliminating the separately allocated struct nfsd_fcache_disposal entirely. These fields now have the same lifetime as the net namespace itself, so there is no dangling pointer to chase. nfsd_file_cache_start_net() now just initializes the inline fields and cannot fail due to allocation. nfsd_file_cache_shutdown_net() drains the inline list directly instead of freeing a separate struct. The alloc/free helpers are removed.
Характеристики атаки
Последствия
Строка CVSS v3.1