Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-37988— fix a couple of races in MNT_TREE_BENEATH handling by do_move_mount()

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于do_move_mount处理MNT_TREE_BENEATH时存在竞争条件,可能导致挂载点父级变更。

CVSS 7.8 · High EPSS 0.15% · P4

Affected Version Matrix 10

VendorProduct Version RangeStatus
Linux Linux 6ac392815628f317fcfdca1a39df00b9cc4ebc8b< 4f435c1f4c48ff84968e2d9159f6fa41f46cf998 affected
6ac392815628f317fcfdca1a39df00b9cc4ebc8b< a61afd54826ac24c2c93845c4f441dbc344875b1 affected
6ac392815628f317fcfdca1a39df00b9cc4ebc8b< d4b21e8cd3d7efa2deb9cff534f0133e84f35086 affected
6ac392815628f317fcfdca1a39df00b9cc4ebc8b< 0d039eac6e5950f9d1ecc9e410c2fd1feaeab3b6 affected
6.5 affected
< 6.5 unaffected
6.6.89≤ 6.6.* unaffected
6.12.26≤ 6.12.* unaffected
… +2 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-37988

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
fix a couple of races in MNT_TREE_BENEATH handling by do_move_mount()
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于do_move_mount处理MNT_TREE_BENEATH时存在竞争条件,可能导致挂载点父级变更。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 6ac392815628f317fcfdca1a39df00b9cc4ebc8b ~ 4f435c1f4c48ff84968e2d9159f6fa41f46cf998 -
Linux Linux 6.5 -

II. Public POCs for CVE-2025-37988

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-37988

请登录查看更多情报信息。

Same Patch Batch · Linux · 2025-05-20 · 95 CVEs total

CVE-2025-37894 9.8 CRITICAL net: use sock_gen_put() when sk_state is TCP_TIME_WAIT
CVE-2025-37924 9.8 CRITICAL ksmbd: fix use-after-free in kerberos authentication
CVE-2025-37935 9.8 CRITICAL net: ethernet: mtk_eth_soc: fix SER panic with 4GB+ RAM
CVE-2025-37959 9.4 CRITICAL bpf: Scrub packet on bpf_redirect_peer
CVE-2025-37926 8.8 HIGH ksmbd: fix use-after-free in ksmbd_session_rpc_open
CVE-2025-37899 8.8 HIGH ksmbd: fix use-after-free in session logoff
CVE-2025-37918 8.8 HIGH Bluetooth: btusb: avoid NULL pointer dereference in skb_dequeue()
CVE-2025-37943 8.8 HIGH wifi: ath12k: Fix invalid data access in ath12k_dp_rx_h_undecap_nwifi
CVE-2025-37944 8.8 HIGH wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process
CVE-2025-37947 8.8 HIGH ksmbd: prevent out-of-bounds stream writes by validating *pos
CVE-2025-37952 8.8 HIGH ksmbd: Fix UAF in __close_file_table_ids
CVE-2025-37956 8.8 HIGH ksmbd: prevent rename with empty string
CVE-2025-37957 8.8 HIGH KVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception
CVE-2025-37936 8.7 HIGH perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPU's value.
CVE-2025-37973 8.1 HIGH wifi: cfg80211: fix out-of-bounds access during multi-link element defragmentation
CVE-2025-37923 7.8 HIGH tracing: Fix oob write in trace_seq_to_buffer()
CVE-2025-37903 7.8 HIGH drm/amd/display: Fix slab-use-after-free in hdcp
CVE-2025-37920 7.8 HIGH xsk: Fix race condition in AF_XDP generic RX path
CVE-2025-37921 7.8 HIGH vxlan: vnifilter: Fix unlocked deletion of default FDB entry
CVE-2025-37906 7.8 HIGH ublk: fix race between io_uring_cmd_complete_in_task and ublk_cancel_cmd

Showing top 20 of 95 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-37988

No comments yet


Leave a comment