{"id":"CVE-2026-98995","summary":"namespace: reset the old parent's -\u003eovermount in mnt_change_mountpoint()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnamespace: reset the old parent's -\u003eovermount in mnt_change_mountpoint()\n\n__umount_mnt() resets -\u003eovermount of the parent when it unmounts the\nmount that overmounts it. mnt_change_mountpoint() doesn't. It moves the\nmount to its new parent and leaves the old one pointing at it.\n\nFor a mount that is moved beneath in attach_recursive_mnt() that doesn't\nmatter. The new mount has already reset -\u003eovermount of the old parent by\nthe time the old top mount is moved onto it.\n\nIt matters for reparent() though. propagate_umount() moves a surviving\novermount onto the first ancestor that isn't going to be unmounted. The\nmount it was taken from is unmounted immediately afterwards. If a file\ndescriptor keeps that unmounted mount alive -\u003eovermount points at the\nmoved mount. That's a dangling pointer and UAF as the moved mount is\nunmounted and freed.\n\ndo_lock_mount() follows -\u003eovermount from the target path under\nmount_lock. With a file descriptor on such a mount as the target of a\nmount beneath topmost_overmount() walks into the freed mount and\ndo_lock_mount() takes references on whatever it finds there.\n\nSo reset -\u003eovermount of the old parent in mnt_change_mountpoint() the\nsame way __umount_mnt() does. A mount's -\u003eovermount is then always a\nmount that is attached to it.","modified":"2026-10-26T02:34:08.207725016Z","published":"2026-10-23T12:20:14.155Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98995.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/08d575ee89393fd812dbdca7b5d7b4574cd5a564"},{"type":"WEB","url":"https://git.kernel.org/stable/c/476ef286a7a5db8bda51325dc0c45887b4d99d9a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5e0a1f2c753a79749bc2ead3ae2f2ede3941daa5"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98995.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98995"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ffdc52fbbd5835a936ad683c943d6d103a2d4514"},{"fixed":"5e0a1f2c753a79749bc2ead3ae2f2ede3941daa5"},{"fixed":"08d575ee89393fd812dbdca7b5d7b4574cd5a564"},{"fixed":"476ef286a7a5db8bda51325dc0c45887b4d99d9a"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-98995.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.17.0"},{"fixed":"6.18.57"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.2.11"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-98995.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}