In the Linux kernel, the following vulnerability has been resolved:
fix a couple of races in MNT_TREE_BENEATH handling by do_move_mount()
Normally do_lock_mount(path, _) is locking a mountpoint pinned by *path and at the time when matching unlock_mount() unlocks that location it is still pinned by the same thing.
Unfortunately, for 'beneath' case it's no longer that simple - the object being locked is not the one *path points to. It's the mountpoint of path->mnt. The thing is, without sufficient locking ->mnt_parent may change under us and none of the locks are held at that point. The rules are * mount_lock stabilizes m->mnt_parent for any mount m. * namespace_sem stabilizes m->mnt_parent, provided that m is mounted. * if either of the above holds and refcount of m is positive, we are guaranteed the same for refcount of m->mnt_parent.
namespace_sem nests inside inode_lock(), so do_lock_mount() has to take inode_lock() before grabbing namespace_sem. It does recheck that path->mnt is still mounted in the same place after getting namespace_sem, and it does take care to pin the dentry. It is needed, since otherwise we might end up with racing mount --move (or umount) happening while we were getting locks; in that case dentry would no longer be a mountpoint and could've been evicted on memory pressure along with its inode - not something you want when grabbing lock on that inode.
However, pinning a dentry is not enough - the matching mount is also pinned only by the fact that path->mnt is mounted on top it and at that point we are not holding any locks whatsoever, so the same kind of races could end up with all references to that mount gone just as we are about to enter inode_lock(). If that happens, we are left with filesystem being shut down while we are holding a dentry reference on it; results are not pretty.
What we need to do is grab both dentry and mount at the same time; that makes inode_lock() safe *and* avoids the problem with fs getting shut down under us. After taking namespace_sem we verify that path->mnt is still mounted (which stabilizes its ->mnt_parent) and check that it's still mounted at the same place. From that point on to the matching namespace_unlock() we are guaranteed that mount/dentry pair we'd grabbed are also pinned by being the mountpoint of path->mnt, so we can quietly drop both the dentry reference (as the current code does) and mnt one - it's OK to do under namespace_sem, since we are not dropping the final refs.
That solves the problem on do_lock_mount() side; unlock_mount() also has one, since dentry is guaranteed to stay pinned only until the namespace_unlock(). That's easy to fix - just have inode_unlock() done earlier, while it's still pinned by mp->m_dentry.
CVSS Details
- CVSS 3.1 Base Score: 7.8
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon_linux_2023 | — | Upgrade bpftoolUpgrade kernel-tools-debuginfoUpgrade kernel6.12-debuginfo-common-aarch64Upgrade perf6.12-debuginfoUpgrade python3-perf6.12Upgrade kernel-libbpf-staticUpgrade kernel6.12-debuginfo-common-x86_64Upgrade kernel-tools-develUpgrade kernel-libbpf-develUpgrade kernel6.12-debuginfoUpgrade kernel-livepatch-6.12.29-33.102Upgrade kernel-libbpfUpgrade kernel-headersUpgrade python3-perf6.12-debuginfoUpgrade kernel-develUpgrade kernel6.12-modules-extraUpgrade perf6.12Upgrade bpftool-debuginfoUpgrade kernel-modules-extra-commonUpgrade kernel-libbpf-debuginfoUpgrade kernel-toolsUpgrade kernel6.12 | Sep 9, 2025 | May 20, 2025 |
| Debian | — | Upgrade linux | Jul 23, 2026 | Jul 23, 2026 |
| Redhat_linux | — | No solution exists | Jul 9, 2025 | May 20, 2025 |
| Suse | — | Upgrade kernel-azure-extraUpgrade kernel-devel-azureUpgrade kernel-64kbUpgrade kernel-obs-qaUpgrade kernel-docs-htmlUpgrade kernel-default-extraUpgrade kernel-sourceUpgrade kernel-default-vdsoUpgrade kernel-64kb-develUpgrade kernel-default-livepatchUpgrade kernel-kvmsmallUpgrade kernel-default-develUpgrade kernel-source-azureUpgrade kernel-kvmsmall-vdsoUpgrade kernel-macrosUpgrade kernel-zfcpdumpUpgrade kernel-symsUpgrade kernel-azure-vdsoUpgrade kernel-kvmsmall-develUpgrade kernel-azure-develUpgrade kernel-defaultUpgrade kernel-source-vanillaUpgrade kernel-64kb-extraUpgrade kernel-azureUpgrade kernel-docsUpgrade kernel-devel | Dec 5, 2025 | Dec 5, 2025 |
| Ubuntu | — | Upgrade linux-image-gcpUpgrade linux-image-nvidia-lowlatency-64k-6.8Upgrade linux-image-awsUpgrade linux-image-6.8.0-100-lowlatency-64kUpgrade linux-image-generic-6.8Upgrade linux-image-6.14.0-1004-realtimeUpgrade linux-image-gcp-64k-6.8Upgrade linux-image-azure-fips-6.8Upgrade linux-image-oracle-64kUpgrade linux-image-6.14.0-1007-oracleUpgrade linux-image-aws-64kUpgrade linux-image-raspi-realtimeUpgrade linux-image-nvidia-hwe-22.04Upgrade linux-image-xilinxUpgrade linux-image-fipsUpgrade linux-image-gkeop-6.8Upgrade linux-image-intel-iot-realtimeUpgrade linux-image-generic-lpaeUpgrade linux-image-nvidia-lowlatency-64kUpgrade linux-image-6.8.0-100-fipsUpgrade linux-image-6.8.0-1046-nvidiaUpgrade linux-image-oracleUpgrade linux-image-6.8.0-1030-gkeopUpgrade linux-image-nvidia-64k-hwe-22.04Upgrade linux-image-xilinx-zynqmpUpgrade linux-image-aws-fips-6.8Upgrade linux-image-6.8.0-1046-aws-64kUpgrade linux-image-lowlatency-hwe-22.04Upgrade linux-image-realtimeUpgrade linux-image-generic-64k-hwe-22.04Upgrade linux-image-6.8.0-1046-azure-fipsUpgrade linux-image-lowlatency-64k-6.8Upgrade linux-image-gcp-64k-lts-24.04Upgrade linux-image-azure-6.8Upgrade linux-image-6.14.0-1007-azure-fdeUpgrade linux-image-gkeUpgrade linux-image-generic-hwe-22.04Upgrade linux-image-6.14.0-22-genericUpgrade linux-image-gcp-lts-24.04Upgrade linux-image-lowlatency-64k-hwe-22.04Upgrade linux-image-kvmUpgrade linux-image-6.8.0-2037-raspi-realtimeUpgrade linux-image-nvidia-64k-6.8Upgrade linux-image-realtime-hwe-22.04Upgrade linux-image-6.8.0-100-generic-64kUpgrade linux-image-6.8.0-1046-aws-fipsUpgrade linux-image-6.8.0-1046-nvidia-64kUpgrade linux-image-fips-6.8Upgrade linux-image-gcp-6.8Upgrade linux-image-intel-iotgUpgrade linux-image-6.8.0-1047-gcpUpgrade linux-image-oem-22.04bUpgrade linux-image-virtualUpgrade linux-image-6.8.0-1044-ibmUpgrade linux-image-genericUpgrade linux-image-aws-64k-lts-24.04Upgrade linux-image-6.8.0-100-genericUpgrade linux-image-lowlatencyUpgrade linux-image-6.8.0-1046-nvidia-lowlatencyUpgrade linux-image-6.14.0-1007-awsUpgrade linux-image-lowlatency-6.8Upgrade linux-image-ibm-lts-24.04Upgrade linux-image-aws-64k-6.8Upgrade linux-image-realtime-6.8.1Upgrade linux-image-gkeopUpgrade linux-image-lowlatency-64kUpgrade linux-image-generic-64kUpgrade linux-image-oracle-6.8Upgrade linux-image-6.8.0-1043-gkeUpgrade linux-image-raspi-realtime-6.8Upgrade linux-image-oem-22.04aUpgrade linux-image-nvidiaUpgrade linux-image-6.14.0-1007-azureUpgrade linux-image-virtual-hwe-22.04Upgrade linux-image-6.8.0-1051-azureUpgrade linux-image-6.8.0-1047-gcp-fipsUpgrade linux-image-gke-64k-6.8Upgrade linux-image-6.8.0-1046-awsUpgrade linux-image-6.8.0-1023-xilinxUpgrade linux-image-nvidia-6.8Upgrade linux-image-xilinx-6.8Upgrade linux-image-nvidia-lowlatencyUpgrade linux-image-ibmUpgrade linux-image-aws-lts-24.04Upgrade linux-image-aws-6.8Upgrade linux-image-oracle-64k-6.8Upgrade linux-image-6.8.0-1043-oracle-64kUpgrade linux-image-oracle-64k-lts-24.04Upgrade linux-image-oem-22.04cUpgrade linux-image-nvidia-64kUpgrade linux-image-gke-6.8Upgrade linux-image-gcp-fipsUpgrade linux-image-6.8.1-1041-realtimeUpgrade linux-image-6.8.0-1046-azureUpgrade linux-image-6.14.0-1007-oracle-64kUpgrade linux-image-6.8.0-1046-nvidia-lowlatency-64kUpgrade linux-image-gcp-64kUpgrade linux-image-oem-22.04dUpgrade linux-image-aws-fipsUpgrade linux-image-6.14.0-1007-aws-64kUpgrade linux-image-6.14.0-1008-gcp-64kUpgrade linux-image-generic-64k-6.8Upgrade linux-image-6.8.0-1047-gcp-64kUpgrade linux-image-ibm-6.8Upgrade linux-image-6.8.0-1047-raspiUpgrade linux-image-gke-64kUpgrade linux-image-azure-fipsUpgrade linux-image-oem-22.04Upgrade linux-image-6.14.0-1007-raspiUpgrade linux-image-6.14.0-1008-gcpUpgrade linux-image-6.8.0-1043-oracleUpgrade linux-image-6.8.0-100-lowlatencyUpgrade linux-image-6.8.0-1043-gke-64kUpgrade linux-image-ibm-classicUpgrade linux-image-azure-lts-24.04Upgrade linux-image-azureUpgrade linux-image-azure-fdeUpgrade linux-image-raspiUpgrade linux-image-gcp-fips-6.8Upgrade linux-image-6.14.0-22-generic-64kUpgrade linux-image-virtual-6.8Upgrade linux-image-raspi-6.8Upgrade linux-image-oracle-lts-24.04Upgrade linux-image-nvidia-lowlatency-6.8 | Jun 26, 2025 | May 20, 2025 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub