# CVE-2025-38306: fs/fhandle.c: fix a race in call of has_locked_children()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 6% of CVEs (2026-11-30)
- Published: 2025-07-10T07:42:16.806Z
- Modified: 2026-08-05T12:01:05.449Z
- Weaknesses: CWE-362
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

fs/fhandle.c: fix a race in call of has_locked_children()

may_decode_fh() is calling has_locked_children() while holding no locks.
That's an oopsable race...

The rest of the callers are safe since they are holding namespace_sem and
are guaranteed a positive refcount on the mount in question.

Rename the current has_locked_children() to __has_locked_children(), make
it static and switch the fs/namespace.c users to it.

Make has_locked_children() a wrapper for __has_locked_children(), calling
the latter under read_seqlock_excl(&mount_lock).

(As written by CVE List.)

## Affected

- Linux Linux: from 620c266f394932e5decc4b34683a75dfc59dc2f4 before 6482c3dccbfb8d20e2856ce67c75856859930b3f; from 620c266f394932e5decc4b34683a75dfc59dc2f4 before 287c7d34eedd37af1272dfb3b6e8656f4f026424; from 620c266f394932e5decc4b34683a75dfc59dc2f4 before 1f282cdc1d219c4a557f7009e81bc792820d9d9a; 6.11 (not affected: before 6.11; from 6.12.46 up to 6.12.*; from 6.15.3 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 6.11 before 6.12.46; from 6.13 before 6.15.3

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/6482c3dccbfb8d20e2856ce67c75856859930b3f> (patch)
- <https://git.kernel.org/stable/c/287c7d34eedd37af1272dfb3b6e8656f4f026424> (patch)
- <https://git.kernel.org/stable/c/1f282cdc1d219c4a557f7009e81bc792820d9d9a> (patch)

## Sources

- CVE List: [CVE-2025-38306](https://www.cve.org/CVERecord?id=CVE-2025-38306), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-38306](https://nvd.nist.gov/vuln/detail/CVE-2025-38306), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-38306 · Whole record: https://cve.day/CVE-2025-38306.json · Rebuilt by cve.day 2026-11-25T22:59:01.065Z
