Look up another CVE · open CVE-2025-71074 in the interactive tracker
CVE-2025-71074
functionfs: fix the open/removal races
Published 2026-01-13 (9 months ago) by the Linux kernel CNA. Subsystem drivers/usb. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-71074 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | vulnerable | 6.12.113-1 | No fix published anywhere yet, neither in Debian nor upstream for the series trixie tracks. Watch the Debian tracker page for this CVE. Advisories for trixie have historically landed a median of 11 days after publication. |
| Debian 14forky | fixed | 6.19.6-1 | Update the kernel and reboot. Fixed in 6.19.6-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.19.6-1 | Update the kernel and reboot. Fixed in 6.19.6-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
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.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
drivers/usb/gadget/function/f_fs.c
- What this is
- USB SUBSYSTEMMAINTAINERS section matched on drivers/usb/ · linux-usb@vger.kernel.org · Supported
- Kernel module
- usb_f_fs
Check it on the machine
grep -wE 'CONFIG_OF|CONFIG_PCI|CONFIG_USB|CONFIG_USB_F_FS|CONFIG_USB_GADGET|CONFIG_USB_PHY|CONFIG_USB_SUPPORT' /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w usb_f_fsPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookwormMnot built on amd64/amd64, amd64/cloud-amd64, amd64/rt/amd64, arm64/cloud-arm64, i386/686, i386/686-pae, i386/rt/686-pae, ppc64el/powerpc64le
- trixieMnot built on amd64/amd64, amd64/cloud-amd64, amd64/rt/amd64, arm64/cloud-arm64, armel/rpi, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, s390x/s390x
- forky, sidMnot built on amd64/amd64, amd64/cloud-amd64, amd64/rt-amd64, arm64/cloud-arm64, loong64/loong64, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, s390x/s390x
- M
- a module where it is built at all; some flavours do not build it
- Build switches
- CONFIG_OF, CONFIG_PCI, CONFIG_USB, CONFIG_USB_F_FS, CONFIG_USB_GADGET, CONFIG_USB_PHY, CONFIG_USB_SUPPORT
- Reads as
- all on means the file is compiled; any one off means it is not.
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2026-01-13 (9 months ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.11%, higher than 1.2% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- drivers/usb
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 2.6.35 | 6.19 | e5bf5ee26663 |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The race is reached through local open, close, read, write, or ioctl operations on FunctionFS endpoint files. A USB host cannot directly invoke ffs_epfile_open(), so this is local rather than physical or network access.
- AC:LAttack complexity, low
- The attacker can race opening a dynamic endpoint against closing the sole remaining ep0 descriptor and repeat the attempt with controlled threads. Both race sides and the freed allocation's endpoint-controlled size are attacker-controlled.
- PR:LPrivileges required, low
- Mounting FunctionFS requires CAP_SYS_ADMIN in the initial user namespace, but endpoint opening has no capability check and uid/gid/fmode options permit delegation to non-root service accounts, as in [AOSP FunctionFS mounts](https://android.googlesource.com/device/google/gs201/%2B/587 5d29f/conf/init.gs201.usb.rc). A low-privileged local account with delegated endpoint access can therefore trigger the race.
- UI:NUser interaction, none
- The attacker independently performs endpoint configuration, concurrent open and close operations, and subsequent use of the stale descriptor without victim interaction.
- S:UScope, unchanged
- Exploitation corrupts memory within the kernel's existing security authority and constitutes ordinary local kernel compromise rather than crossing a VM or IOMMU boundary.
- C:HConfidentiality impact, high
- The attacker-sized heap object contains numerous pointers and can be reclaimed before stale read, ioctl, or release operations, making kernel-memory disclosure through the UAF defensible.
- I:HIntegrity impact, high
- The stale object reaches mutex and list operations, atomic modification, xchg and kfree operations, and USB request handling, providing plausible arbitrary-write, arbitrary-free, and control-flow-hijacking primitives.
- A:HAvailability impact, high
- Dereferencing the freed object, locking reclaimed mutexes, freeing attacker-influenced pointers, or triggering warnings under panic-on-warn can crash or panic the kernel.