Ad

CVE-2026-98992

NONE EPSS 0.21%
Обновлено 30 октября 2026
Linux
Параметр Значение
Поставщик Linux
Публичный эксплойт Нет

В ядре Linux была устранена следующая уязвимость: namespace: don't copy an unmounted mount tree may_copy_tree() принимает монтирование, корнем которого является файл nsfs или pidfs, прежде чем он проверит, смонтировано ли это монтирование. Это исключение существует для NSFS и PIDFS mounts. Они не являются частью пространства имен монтирования, поэтому ни check_mnt(), ни is_mounted() не пропускают их, и привязка-монтаж nsfsfd или pidfd не будет работать.

Проблема в том, что исключение также допускает крепление привязки такого файла, когда он был лениво размонтирован и поддерживается только файловым дескриптором: mount --bind /proc/self/ns/net /tmp/x exec 3< /tmp/x umount -l /tmp/x mount --rbind /proc/self/fd/3 /tmp/y With MS_REC или AT_RECURSIVE copy_tree() не останавливается на размонтированном. Он также копирует каждую гору, которая осталась привязанной к нему. Таким образом, если у вас есть куча переборов над nsfsfd или pidfd, весь немонтированный стек копируется.

Это жук. Так что отказывайтесь ходить по немонтированному дереву. Копирование его корня само по себе остается возможным.

Таким образом, привязанное монтирование пространства имен, которое исчезло, все еще может быть воссоздано из дескриптора файла на старом. Файл-дескриптор, который монтируется, и его корень и __has_locked_children() читают только прямые дети, которые не покидают родительский список без namespace_sem. Внутренние крепления несут MNT_NS_INTERNAL вместо NULL и по-прежнему ходят.

Копирование немонтированного дерева рекурсивно не удаётся с помощью EINVAL.

Показать оригинальное описание (EN)

In the Linux kernel, the following vulnerability has been resolved: namespace: don't copy an unmounted mount tree may_copy_tree() accepts a mount whose root is an nsfs or pidfs file before it checks whether that mount is mounted. This exception exists for nsfs and pidfs mounts. They are part of no mount namespace so neither check_mnt() nor is_mounted() would let them through and bind-mounting a nsfsfd or a pidfd wouldn't work. Problem is that exception also admits a bind mount of such a file when it was lazily unmounted and is only kept alive by a file descriptor: mount --bind /proc/self/ns/net /tmp/x exec 3< /tmp/x umount -l /tmp/x mount --rbind /proc/self/fd/3 /tmp/y With MS_REC or AT_RECURSIVE copy_tree() doesn't stop at the unmounted mount. It copies every mount that stayed attached to it as well. So if you have a bunch of overmounts over the nsfsfd or the pidfd the whole unmounted stack is copied. That's a bug. So refuse to walk an unmounted tree. Copying its root alone stays possible. So a bind mount of a namespace that is gone can still be recreated from a file descriptor on the old one. The file descriptor pins that mount and its root and __has_locked_children() only reads the direct children which don't leave the parent's list without namespace_sem. The internal mounts carry MNT_NS_INTERNAL instead of NULL and are still walked. Copying an unmounted tree recursively fails with EINVAL.