Home / Linux / Linux / CVE-2025-40315
CVE-2025-40315: is it exploited, and which versions of Linux are affected and fixed?
CVE-2025-40315 is a vulnerability in Linux. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 16:39 UTC). Affected: Linux from 5.4.180 before 5.4.302, Linux from 5.10.101 before 5.10.247, Linux from 5.15.24 before 5.15.197 and 4 more (CVE record by Linux). Fixed in 5.4.302, 5.10.247, 5.15.197, 4.15 and 2 more (CVE record by Linux).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 16:39 UTC, CVE record November 28, 2026, 17:36 UTC and NVD November 19, 2026, 07:15 UTC.
What is CVE-2025-40315?
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
From the CVE record by Linux, last updated May 23, 2026, 16:02 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| Linux | Linux | from 5.4.180 before 5.4.302 from 5.10.101 before 5.10.247 from 5.15.24 before 5.15.197 from 4.14.267 before 4.15 from 4.19.230 before 4.20 from 5.16.10 before 5.17 | 5.4.302, 5.10.247, 5.15.197, 4.15, 4.20, 5.17 |
| Linux | Linux | from 5.17 until the fixed versions | 5.4.302, 5.10.247, 5.15.197, 6.1.159, 6.6.117, 6.12.58, 6.17.8, 6.18 |
As the CVE record by Linux states it, last updated May 23, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Is CVE-2025-40315 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 0.22% probability of exploitation activity in the next 30 days, percentile 12.8 (FIRST EPSS, scores of December 3, 2026)
Where are the vendor advisories and references?
- https://git.kernel.org/stable/c/b00d2572c16e8e59e979960d3383c2ae9cebd195
- https://git.kernel.org/stable/c/1c0dbd240be3f87cac321b14e17979b7e9cb6a8f
- https://git.kernel.org/stable/c/9ec40fba7357df2d36f4c2e2f3b9b1a4fba0a272
- https://git.kernel.org/stable/c/c53e90563bc148e4e0ad09fe130ba2246d426ea6
- https://git.kernel.org/stable/c/fc1141a530dfc91f0ee19b7f422a2d24829584bc
- https://git.kernel.org/stable/c/d62b808d5c68a931ad0849a00a5e3be3dd7e0019
- https://git.kernel.org/stable/c/30880e9df27332403dd638a82c27921134b3630b
- https://git.kernel.org/stable/c/cfd6f1a7b42f62523c96d9703ef32b0dbc495ba4
When was it published, and where is the official record?
- Reserved
- April 16, 2025
- Published
- December 8, 2025, 00:46 UTC
- CVE record updated
- May 23, 2026, 16:02 UTC by Linux
- NVD
- Deferred, last modified October 14, 2026, 22:10 UTC
- Last checked
- CVE list November 28, 2026, 17:36 UTC; NVD November 19, 2026, 07:15 UTC; KEV December 3, 2026, 16:39 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect Linux?
- Jul 4, 2026CVE-2026-53362 Linux: heap buffer overflow exploited
- Jun 25, 2026CVE-2026-53266 Linux: out-of-bounds write (memory corruption) exploited
- May 23, 2026CVE-2026-46300 Linux: write-what-where Condition exploited
- Apr 22, 2026CVE-2026-31431 Linux: incorrect resource transfer exploited
- Oct 13, 2025CVE-2025-39964 Linux: race condition exploited
- Sep 5, 2025CVE-2025-39682 Linux: unusual condition not checked exploited
- Jul 22, 2025CVE-2025-38352 Linux: time-of-check time-of-use race condition exploited
- Dec 27, 2024CVE-2024-53197 Linux: out-of-bounds write (memory corruption) exploited
Questions about CVE-2025-40315
Is CVE-2025-40315 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 16:39 UTC. FIRST's EPSS gives it a 0.22% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of Linux are affected by CVE-2025-40315?
Linux from 5.4.180 before 5.4.302, Linux from 5.10.101 before 5.10.247, Linux from 5.15.24 before 5.15.197, Linux from 4.14.267 before 4.15, Linux from 4.19.230 before 4.20, Linux from 5.16.10 before 5.17 and 1 more, per the CVE record by Linux. The tables above give every range the sources list.
Which version fixes CVE-2025-40315?
5.4.302, 5.10.247, 5.15.197, 4.15, 4.20 and 5.17, per the CVE record by Linux. Check the vendor's advisory before you rely on it.
Where is the official record of CVE-2025-40315?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.