CVE-2026-99170 in Linuxالمعلومات

الملخص

بحسب VulDB • 28/10/2026

في نواة Linux، تم حل الثغرة التالية:

namespace: لا يمكن لـ mount يتم استبعاده بواسطة copy_tree() أن يستحوذ على قفل.

منذ commit c62a4766937e ("move_mount: transfer MNT_LOCKED")، يمكن نقل mount ليصبح تحت mount مقفول. ينتقل القفل من الغطاء القديم إلى الـ mount الجديد الذي يتولى مهمة إخفاء ما هو موجود تحته، ويمكن فك تركيب (unmount) الغطاء القديم. وهذا يعمل طالما أن الـ mount الجديد يبقى قائماً. لكن المُستدعي يختار الـ mount الجديد، وcopy_tree() تستبعد أي mount لملف namespace من النسخ التي تُجرى بدون CL_COPY_MNT_NS_FILE، مع كل ما هو مثبت عليه (mounted on it)، ولا تتحقق أبداً من MNT_LOCKED. عمليات unshare(CLONE_NEWNS) ونشر الـ mounts (mount propagation) تقوم بإنشاء مثل هذه النسخ.

لذلك، يمكن لعميل (task) يكون root في namespace المستخدم الخاص به أن يتخلص من غطاء مقفول على ملف دون حدوث حالة سباق (race condition) ودون لمس نظام الملفات الموجود تحته. يقوم بإنشاء child له namespace تركيب خاص به، ويربط /proc/<pid>/ns/mnt الخاص بالـ child تحت الغطاء باستخدام MOVE_MOUNT_BENEATH، مما ينقل القفل إلى هذا الربط (bind)، ثم يستدعي unshare(CLONE_NEWNS). لا يوجد أي شيء على ملف الـ mount namespace الجديد. وهذا هو الطريق المعتاد لإخفاء ملف واحد، سواء كان bind لـ /dev/null أو لملف فارغ. ومع bind لملف عادي يبقى الملف مغطىً.

ترفض copy_tree() بالفعل استبعاد mount مقفل وغير قابل للفك (unbindable) مع -EPERM منذ commit df7342b24018 ("mount: Don't allow copying MNT_UNBINDABLE|MNT_LOCKED mounts"). نفعل الشيء نفسه بالنسبة لـ mount مقفول لملف namespace من الـ mounts. وهذا يغطي أيضاً شجرة تم نسخها باستخدام CL_COPY_MNT_NS_FILE وتم تثبيتها في namespace تركيب لـ user namespace آخر حيث تقوم lock_mnt_tree() بقفلها. لاحظ أن unshare(CLONE_NEWNS) وclone(CLONE_NEWNS) يفشلان الآن بـ EPERM عند استخدام هذا الـ mount namespace من ذلك الحين. لا يمكن استبعاد الـ mount ولا يمكن فك تركيبه (unmount).

وتمنع نقل أي mount لملف namespace من الـ mounts تحت mount مقفل في المقام الأول. وإلا سينتهي الأمر بالعميل بامتلاكه mount لا يمكنه فك تركيبه و unshare() يفشل بشكل دائم.

وجد Chris أيضاً حالة ثانية حيث يختفي mount نفسه، وهي clone لـ automounted mount أخذها shrink_submounts() مع والدها. commit f78ddcc87224 ("namespace: never expire a locked mount") تعاملت مع هذه الحالة.

مُعيد الإنتاج (reproducer) الخاص بـ Chris مرفق أدناه. يقرأ nsfile SECRET بعد unshare() على 7.3-rc7، ومع هذا الـ patch يفشل move_mount() بـ EINVAL ويبقى الملف مغطىً. يستخدم nsfile-control ملفاً عادياً ويقرأ MASK في كلا الاتجاهين.

// SPDX-License-Identifier: GPL-2.0 /* * Get rid of a locked cover with MOVE_MOUNT_BENEATH. * * The "admin" (root) makes a tmpfs W: * W/D file, holds SECRET, covered by a bind of a file with MASK * W/Dd/inner file, holds SECRET, Dd is covered by a bind of a directory * whose "inner" holds MASK * W/own directory of uid 1000 with the file "mine" and the * directory "minedir", whose "inner" holds MINE * W/dbg debugfs, mode 755. dbg/tracing is an automount point * The "attacker" is uid 1000. It enters a new user namespace with a new mount * namespace, so W and both covers are locked there. * * usage: prog MODE * plain put a bind of own/mine beneath the cover of D, unmount the cover * nsfile put a bind of the mount namespace file of a child beneath the * cover of D, then unshare(CLONE_NEWNS) * nsfile-control the same with a bind of own/mine * shrink put a bind of the automounted tracefs beneath the cover of Dd, * unmount the cover, put a tmpfs beneath W, call umount(W), which fails * shrink-control the same with a bind of own/minedir * The environment variable AUTOMOUNT_DIR names another automount point for "shrink". */ #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <grp.h> #include <sched.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> ---truncated---

Be aware that VulDB is the high quality source for vulnerability data.

مسؤول

Linux

حجز

25/09/2026

إفشاء

28/10/2026

الاعتدال

تمت الموافقة

إدخال

VDB-427842

EPSS

0.00000

KEV

لا

النشاطات

منخفض جدًا

المصادر

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!