В ядре Linux устранена следующая уязвимость:
NFSD: перезапустить обход ssc_expire_umount после удаления nfsd_ssc_lock
nfsd4_ssc_expire_umount() просматривает nn->nfsd_ssc_mount_list с помощью
list_for_each_entry_safe(ni, tmp, ...). Для каждой записи с истекшим сроком действия
устанавливает nsui_busy = true, удаляет nfsd_ssc_lock для запуска mntput() на
исходный vfsmount, затем повторно получает блокировку list_del + kfree
запись и продолжить итерацию с помощью сохраненного указателя tmp макроса. Флаг nsui_busy защищает текущий ni от одновременного
nfsd4_ssc_setup_dul() во время окна блокировки, но это
не закрепляет tmp.
Еще один поток RPC nfsd, у которого произошел сбой в исходном коде.
сервер монтируется и достигает nfsd4_ssc_cancel_dul(), во время этого
то же окно, возьмите nfsd_ssc_lock, list_del + kfree свой собственный ssc_umount
предмет и отпустите блокировку. Если этот элемент является сохраненным темпом
истекает, следующая итерация разыменовывает освобожденный
nfsd4_ssc_umount_item. Перезапустите прогулку из головы после окна разблокировки mntput(), чтобы
ни один сохраненный указатель следующего указателя не сохраняется после блокировки.
Список ограничен по количеству активных межсерверных подключений исходных кодов (обычно небольших) и отложенная работа по истечении срока действия выполняется периодически, а не для каждого ввода-вывода, так что перезапуск стоит дешево.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: NFSD: restart ssc_expire_umount walk after dropping nfsd_ssc_lock nfsd4_ssc_expire_umount() walks nn->nfsd_ssc_mount_list with list_for_each_entry_safe(ni, tmp, ...). For each expired entry it sets nsui_busy = true, drops nfsd_ssc_lock to run mntput() on the source vfsmount, then reacquires the lock to list_del + kfree the entry and continue iterating via the macro's saved tmp pointer. The nsui_busy flag protects the current ni from concurrent nfsd4_ssc_setup_dul() finders during the lock-drop window, but it does not pin tmp. Another nfsd RPC thread that fails its source- server mount and reaches nfsd4_ssc_cancel_dul() will, during that same window, take nfsd_ssc_lock, list_del + kfree its own ssc_umount item, and release the lock. If that item is the saved tmp of the expire walk, the next iteration dereferences a freed nfsd4_ssc_umount_item. Restart the walk from the head after the mntput() unlock window so no saved next pointer survives the lock-drop. The list is bounded by the number of active inter-server source mounts (typically small) and the expire delayed-work runs periodically rather than per-IO, so the restart is cheap.
Характеристики атаки
Последствия
Строка CVSS v3.1