CVE-2025-40315
CVE-2025-40315 — usb: gadget: f_fs: Fix epfile null pointer access after ep enable.
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Fix epfile null pointer access after ep enable. A race condition occurs when ffs_func_eps_enable() runs concurrently with ffs_data_reset(). The ffs_data_clear() called in ffs_data_reset() sets ffs->epfiles to NULL before resetting ffs->eps_count to 0, leading to a NULL pointer dereference when accessing epfile->ep in ffs_func_eps_enable() after successful usb_ep_enable(). The ffs->epfiles pointer is set to NULL in both ffs_data_clear() and ffs_data_close() functions, and its modification is protected by the spinlock ffs->eps_lock. And the whole ffs_func_eps_enable() function is also protected by ffs->eps_lock. Thus, add NULL pointer handling for ffs->epfiles in the ffs_func_eps_enable() function to fix issues
Published Updated Sources: cvelistV5, Linux
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
<1%
chance of exploitation in 30 days
CVSS base
Unscored
no source published a base score
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (1)
Products (1)
References
8 on the record
- git.kernel.org/stable/c/b00d2572c16e8e59e979960d3383c2ae9cebd195
reference
- git.kernel.org/stable/c/1c0dbd240be3f87cac321b14e17979b7e9cb6a8f
reference
- git.kernel.org/stable/c/9ec40fba7357df2d36f4c2e2f3b9b1a4fba0a272
reference
- git.kernel.org/stable/c/c53e90563bc148e4e0ad09fe130ba2246d426ea6
reference
- git.kernel.org/stable/c/fc1141a530dfc91f0ee19b7f422a2d24829584bc
reference
- git.kernel.org/stable/c/d62b808d5c68a931ad0849a00a5e3be3dd7e0019
reference
- git.kernel.org/stable/c/30880e9df27332403dd638a82c27921134b3630b
reference
- git.kernel.org/stable/c/cfd6f1a7b42f62523c96d9703ef32b0dbc495ba4
reference
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2025-39682 tls: fix handling of zero-length records on the rx_listCVSS 9.8 · CISA KEV
- CVE-2016-3427 Oracle Java SE and JRockit Unspecified VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2026-53266 netfilter: bridge: make ebt_snat ARP rewrite writableCVSS 8.8 · CISA KEV
- CVE-2026-46300 net: skbuff: preserve shared-frag marker during coalescingCVSS 7.8 · CISA KEV
- CVE-2026-31431 crypto: algif_aead - Revert to operating out-of-placeCVSS 7.8 · CISA KEV
- CVE-2014-3153 Linux Kernel Privilege Escalation VulnerabilityCVSS 7.8 · CISA KEV
Elsewhere on this site
- Linuxevery CVE for this vendor
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.