В ядре Linux была устранена следующая уязвимость: filelock: keep superblock active through delegation wait Вызывающий может отказаться от своего пути после того, как try_break_deleg() вернет делегированный inode, но до завершения break_deleg_wait(). Дополнительная ссылка на inode, содержащаяся в struct delegated_inode, не поддерживает активность суперблока. После ленивого демонтажа, закрытие держателя делегирования может освободить последнюю ссылку на монтирование и выключить суперблок, в то время как другая задача ожидает перерыва делегирования.
Окончательный iput() официанта может затем ввести код выселения файловой системы после того, как его суперблок-частное состояние было освобождено. Это было замечено как KASAN use-after-free в shmem_evict_inode(). Когда try_break_deleg() сохраняет делегированный inode, возьмите активную ссылку на его суперблок, пока вызывающее устройство все еще прикрепляет крепление.
Сохраните эту ссылку через break_deleg_wait() и окончательный iput(), а затем отпустите его с помощью deactivate_super(). Это защищает каждого вызывающего помощника, включая пути mknod, mkdir, symlink и rmdir, которые отбрасывают свой путь перед ожиданием.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: filelock: keep superblock active through delegation wait A caller may drop its path after try_break_deleg() returns a delegated inode but before break_deleg_wait() finishes. The extra inode reference held in struct delegated_inode does not keep the superblock active. After a lazy unmount, closing the delegation holder can release the last mount reference and shut down the superblock while another task waits for the delegation break. The waiter's final iput() can then enter the filesystem's eviction code after its superblock-private state was freed. This has been observed as a KASAN use-after-free in shmem_evict_inode(). When try_break_deleg() saves a delegated inode, take an active reference to its superblock while the caller still pins the mount. Keep that reference through break_deleg_wait() and the final iput(), then release it with deactivate_super(). This protects every caller of the helpers, including the mknod, mkdir, symlink and rmdir paths that drop their path before waiting.
Характеристики атаки
Последствия
Строка CVSS v3.1