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 kernel-livepatch-6.12.29-33.102Upgrade kernel6.12-debuginfoUpgrade kernel6.12-debuginfo-common-x86_64Upgrade kernel-headersUpgrade kernel6.12-debuginfo-common-aarch64Upgrade kernel6.12-modules-extraUpgrade kernel-develUpgrade python3-perf6.12-debuginfoUpgrade kernel-libbpfUpgrade python3-perf6.12Upgrade kernel-libbpf-staticUpgrade bpftoolUpgrade kernel-tools-develUpgrade kernel-libbpf-develUpgrade kernel-tools-debuginfoUpgrade perf6.12-debuginfoUpgrade perf6.12Upgrade kernel-toolsUpgrade kernel6.12Upgrade kernel-modules-extra-commonUpgrade bpftool-debuginfoUpgrade kernel-libbpf-debuginfo | 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-64kbUpgrade kernel-source-azureUpgrade kernel-default-extraUpgrade kernel-kvmsmallUpgrade kernel-kvmsmall-develUpgrade kernel-azure-vdsoUpgrade kernel-docs-htmlUpgrade kernel-default-vdsoUpgrade kernel-devel-azureUpgrade kernel-default-develUpgrade kernel-azure-extraUpgrade kernel-obs-qaUpgrade kernel-macrosUpgrade kernel-zfcpdumpUpgrade kernel-kvmsmall-vdsoUpgrade kernel-sourceUpgrade kernel-64kb-develUpgrade kernel-default-livepatchUpgrade kernel-symsUpgrade kernel-docsUpgrade kernel-azureUpgrade kernel-defaultUpgrade kernel-source-vanillaUpgrade kernel-develUpgrade kernel-azure-develUpgrade kernel-64kb-extra | Dec 5, 2025 | Dec 5, 2025 |
| Ubuntu | — | Upgrade linux-image-6.8.0-1046-awsUpgrade linux-image-oem-22.04aUpgrade linux-image-virtual-hwe-22.04Upgrade linux-image-ibm-classicUpgrade linux-image-ibmUpgrade linux-image-nvidia-lowlatencyUpgrade linux-image-xilinx-6.8Upgrade linux-image-aws-6.8Upgrade linux-image-aws-64k-lts-24.04Upgrade linux-image-azure-lts-24.04Upgrade linux-image-6.14.0-1007-awsUpgrade linux-image-aws-lts-24.04Upgrade linux-image-nvidia-64kUpgrade linux-image-oem-22.04cUpgrade linux-image-gke-6.8Upgrade linux-image-oracle-64k-6.8Upgrade linux-image-6.8.1-1041-realtimeUpgrade linux-image-gcp-fipsUpgrade linux-image-oracle-64k-lts-24.04Upgrade linux-image-nvidia-6.8Upgrade linux-image-lowlatency-64kUpgrade linux-image-6.14.0-1007-oracle-64kUpgrade linux-image-azure-fipsUpgrade linux-image-6.8.0-1043-oracle-64kUpgrade linux-image-oem-22.04Upgrade linux-image-realtime-6.8.1Upgrade linux-image-6.8.0-1047-gcp-fipsUpgrade linux-image-6.8.0-1046-azureUpgrade linux-image-6.8.0-1051-azureUpgrade linux-image-gkeopUpgrade linux-image-6.8.0-1046-nvidia-lowlatency-64kUpgrade linux-image-6.8.0-1023-xilinxUpgrade linux-image-gcp-64kUpgrade linux-image-oem-22.04dUpgrade linux-image-oracle-lts-24.04Upgrade linux-image-raspiUpgrade linux-image-raspi-6.8Upgrade linux-image-6.14.0-22-generic-64kUpgrade linux-image-azure-fdeUpgrade linux-image-gcp-fips-6.8Upgrade linux-image-virtual-6.8Upgrade linux-image-aws-64k-6.8Upgrade linux-image-ibm-lts-24.04Upgrade linux-image-gke-64kUpgrade linux-image-lowlatency-6.8Upgrade linux-image-nvidia-lowlatency-6.8Upgrade linux-image-6.8.0-1047-raspiUpgrade linux-image-gke-64k-6.8Upgrade linux-image-6.14.0-1007-aws-64kUpgrade linux-image-6.8.0-1046-nvidia-lowlatencyUpgrade linux-image-genericUpgrade linux-image-6.14.0-1007-raspiUpgrade linux-image-generic-64kUpgrade linux-image-6.8.0-100-genericUpgrade linux-image-6.8.0-1044-ibmUpgrade linux-image-6.14.0-1008-gcpUpgrade linux-image-lowlatencyUpgrade linux-image-6.8.0-1043-gkeUpgrade linux-image-azureUpgrade linux-image-6.14.0-1007-azureUpgrade linux-image-6.8.0-1043-gke-64kUpgrade linux-image-nvidiaUpgrade linux-image-raspi-realtime-6.8Upgrade linux-image-oracle-6.8Upgrade linux-image-generic-64k-6.8Upgrade linux-image-6.8.0-1047-gcp-64kUpgrade linux-image-6.8.0-100-lowlatencyUpgrade linux-image-6.14.0-1008-gcp-64kUpgrade linux-image-aws-fipsUpgrade linux-image-ibm-6.8Upgrade linux-image-6.8.0-1043-oracleUpgrade linux-image-6.8.0-1046-azure-fipsUpgrade linux-image-gcp-64k-6.8Upgrade linux-image-gkeUpgrade linux-image-6.8.0-1030-gkeopUpgrade linux-image-6.8.0-1046-nvidia-64kUpgrade linux-image-aws-fips-6.8Upgrade linux-image-6.14.0-22-genericUpgrade linux-image-raspi-realtimeUpgrade linux-image-realtimeUpgrade linux-image-lowlatency-hwe-22.04Upgrade linux-image-generic-hwe-22.04Upgrade linux-image-generic-6.8Upgrade linux-image-6.14.0-1007-azure-fdeUpgrade linux-image-6.14.0-1004-realtimeUpgrade linux-image-awsUpgrade linux-image-generic-64k-hwe-22.04Upgrade linux-image-aws-64kUpgrade linux-image-oem-22.04bUpgrade linux-image-lowlatency-64k-6.8Upgrade linux-image-6.8.0-100-lowlatency-64kUpgrade linux-image-6.8.0-1047-gcpUpgrade linux-image-azure-6.8Upgrade linux-image-6.8.0-1046-aws-fipsUpgrade linux-image-realtime-hwe-22.04Upgrade linux-image-gcp-6.8Upgrade linux-image-fips-6.8Upgrade linux-image-6.8.0-2037-raspi-realtimeUpgrade linux-image-virtualUpgrade linux-image-gcp-lts-24.04Upgrade linux-image-gcp-64k-lts-24.04Upgrade linux-image-kvmUpgrade linux-image-nvidia-64k-6.8Upgrade linux-image-xilinxUpgrade linux-image-nvidia-lowlatency-64kUpgrade linux-image-gkeop-6.8Upgrade linux-image-6.8.0-100-generic-64kUpgrade linux-image-6.8.0-100-fipsUpgrade linux-image-6.8.0-1046-nvidiaUpgrade linux-image-generic-lpaeUpgrade linux-image-intel-iot-realtimeUpgrade linux-image-oracleUpgrade linux-image-fipsUpgrade linux-image-intel-iotgUpgrade linux-image-nvidia-hwe-22.04Upgrade linux-image-oracle-64kUpgrade linux-image-nvidia-lowlatency-64k-6.8Upgrade linux-image-lowlatency-64k-hwe-22.04Upgrade linux-image-gcpUpgrade linux-image-xilinx-zynqmpUpgrade linux-image-6.8.0-1046-aws-64kUpgrade linux-image-6.14.0-1007-oracleUpgrade linux-image-nvidia-64k-hwe-22.04Upgrade linux-image-azure-fips-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