В ядре Linux устранена следующая уязвимость:
smb: во время размонтирования убедитесь, что все экземпляры кэшированного каталога удалили свои данные. Процесс размонтирования (cifs_kill_sb(), вызывающий close_all_cached_dirs()) может
гонка с различными операциями с кэшированными каталогами, что в конечном итоге приводит
в dentries не удаляются и эти ОШИБКИ ядра:
ОШИБКА: Dentry ffff88814f37e358{i=1000000000080,n=/} все еще используется (2) [размонтировать cifs cifs]
VFS: заняты иноды после размонтирования cifs (cifs)
------------[вырезать здесь]------------
ОШИБКА ядра в fs/super.c:661!
Это происходит, когда cfid находится в процессе очистки, и
было удалено из списка cfids->entries, включая:
- Получение отсрочки аренды с сервера
- Переподключение сервера запускает validate_all_cached_dirs(), что
удаляет все cfids из списка
- Ветка прачечной решает истечь срок действия старого cfid. Чтобы решить эти проблемы, удаление зубного камня выполняется в очереди выполненных работ.
в недавно добавленной рабочей очереди cfid_put_wq и close_all_cached_dirs()
очищает эту рабочую очередь после того, как она удаляет все элементы, из которых она состоит
в курсе.
Это глобальная рабочая очередь (а не привязанная к монтированию), но
работа в очереди минимальна. Заключительная работа по очистке cfid выполняется через работу
поставлен в очередь в рабочей очереди serverclose_wq; это делается отдельно от
удаление dentries, чтобы close_all_cached_dirs() не блокировалось
любые серверные операции. Ожидается, что обе эти задачи, поставленные в очередь, будут вызваны с помощью ссылки cfid и
ссылка tcon, чтобы избежать освобождения этих объектов во время работы
продолжается.
Пока мы здесь, добавьте правильную блокировку в close_all_cached_dirs() и
блокировка вокруг освобождения cfid->dentry.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: smb: During unmount, ensure all cached dir instances drop their dentry The unmount process (cifs_kill_sb() calling close_all_cached_dirs()) can race with various cached directory operations, which ultimately results in dentries not being dropped and these kernel BUGs: BUG: Dentry ffff88814f37e358{i=1000000000080,n=/} still in use (2) [unmount of cifs cifs] VFS: Busy inodes after unmount of cifs (cifs) ------------[ cut here ]------------ kernel BUG at fs/super.c:661! This happens when a cfid is in the process of being cleaned up when, and has been removed from the cfids->entries list, including: - Receiving a lease break from the server - Server reconnection triggers invalidate_all_cached_dirs(), which removes all the cfids from the list - The laundromat thread decides to expire an old cfid. To solve these problems, dropping the dentry is done in queued work done in a newly-added cfid_put_wq workqueue, and close_all_cached_dirs() flushes that workqueue after it drops all the dentries of which it's aware. This is a global workqueue (rather than scoped to a mount), but the queued work is minimal. The final cleanup work for cleaning up a cfid is performed via work queued in the serverclose_wq workqueue; this is done separate from dropping the dentries so that close_all_cached_dirs() doesn't block on any server operations. Both of these queued works expect to invoked with a cfid reference and a tcon reference to avoid those objects from being freed while the work is ongoing. While we're here, add proper locking to close_all_cached_dirs(), and locking around the freeing of cfid->dentry.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 3
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1
|
6.6.64
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.11.11
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.12
|
6.12.2
|