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