CVE-2025-39901
i40e: remove read access to debugfs files
Mitigation
- Upgrade Linux to 9fcdb1c3c4ba134434694c001dbff343f1ffa319 or later.
Who should check
- Anyone running Linux >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 6fd8b30a5cb84d74015bc651799d1ab1e047946c; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < ef40d9411469306e524e7887c51b709377e6ef65; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 70d3dad7d5ad077965d7a63eed1942b7ba49bfb4; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 7d190963b80f4cd99d7008615600aa7cc993c6ba; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 9fcdb1c3c4ba134434694c001dbff343f1ffa319
- Anyone running Linux 3.12
Vulnerability facts
- Affected
- Linux >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 6fd8b30a5cb84d74015bc651799d1ab1e047946c; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < ef40d9411469306e524e7887c51b709377e6ef65; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 70d3dad7d5ad077965d7a63eed1942b7ba49bfb4; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 7d190963b80f4cd99d7008615600aa7cc993c6ba; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 9fcdb1c3c4ba134434694c001dbff343f1ffa319; Linux 3.12
- Fixed in
- Linux 6fd8b30a5cb84d74015bc651799d1ab1e047946c, Linux 70d3dad7d5ad077965d7a63eed1942b7ba49bfb4, Linux 7d190963b80f4cd99d7008615600aa7cc993c6ba, Linux 9fcdb1c3c4ba134434694c001dbff343f1ffa319
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.1 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: High
- EPSS
- 0.22% chance of exploitation in 30 days (percentile 8, 2026-11-26)
- CWE
- CWE-125
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: i40e: remove read access to debugfs files The 'command' and 'netdev_ops' debugfs files are a legacy debugging interface supported by the i40e driver since its early days by commit 02e9c290814c ("i40e: debugfs interface"). Both of these debugfs files provide a read handler which is mostly useless, and which is implemented with questionable logic. They both use a static 256 byte buffer which is initialized to the empty string. In the case of the 'command' file this buffer is literally never used and simply wastes space. In the case of the 'netdev_ops' file, the last command written is saved here. On read, the files contents are presented as the name of the device followed by a colon and then the contents of their respective static buffer. For 'command' this will always be "<device>: ". For 'netdev_ops', this will be "<device>: <last command written>". But note the buffer is shared between all devices operated by this module. At best, it is mostly meaningless information, and at worse it could be accessed simultaneously as there doesn't appear to be any locking mechanism. We have also recently received multiple reports for both read functions about their use of snprintf and potential overflow that could result in reading arbitrary kernel memory. For the 'command' file, this is definitely impossible, since the static buffer is always zero and never written to. For the 'netdev_ops' file, it does appear to be possible, if the user carefully crafts the command input, it will be copied into the buffer, which could be large enough to cause snprintf to truncate, which then causes the copy_to_user to read beyond the length of the buffer allocated by kzalloc. A minimal fix would be to replace snprintf() with scnprintf() which would cap the return to the number of bytes written, preventing an overflow. A more involved fix would be to drop the mostly useless static buffers, saving 512 bytes and modifying the read functions to stop needing those as input. Instead, lets just completely drop the read access to these files. These are debug interfaces exposed as part of debugfs, and I don't believe that dropping read access will break any script, as the provided output is pretty useless. You can find the netdev name through other more standard interfaces, and the 'netdev_ops' interface can easily result in garbage if you issue simultaneous writes to multiple devices at once. In order to properly remove the i40e_dbg_netdev_ops_buf, we need to refactor its write function to avoid using the static buffer. Instead, use the same logic as the i40e_dbg_command_write, with an allocated buffer. Update the code to use this instead of the static buffer, and ensure we free the buffer on exit. This fixes simultaneous writes to 'netdev_ops' on multiple devices, and allows us to remove the now unused static buffer along with removing the read access.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 6fd8b30a5cb84d74015bc651799d1ab1e047946c; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < ef40d9411469306e524e7887c51b709377e6ef65; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 70d3dad7d5ad077965d7a63eed1942b7ba49bfb4; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 7d190963b80f4cd99d7008615600aa7cc993c6ba; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 9fcdb1c3c4ba134434694c001dbff343f1ffa319 | — | cvelist |
| Linux | 3.12 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-39901. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-39901.md Affected: Linux >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 6fd8b30a5cb84d74015bc651799d1ab1e047946c; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < ef40d9411469306e524e7887c51b709377e6ef65; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 70d3dad7d5ad077965d7a63eed1942b7ba49bfb4; >= 02e9c290814cc143ceccecb… Fixed in: Linux 6fd8b30a5cb84d74015bc651799d1ab1e047946c, Linux 70d3dad7d5ad077965d7a63eed1942b7ba49bfb4, Linux 7d190963b80f4cd99d7008615600aa7cc993c6ba, Linux 9fcdb1c3c4ba134434694c001dbff343f1ffa319 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
FAQ
Is CVE-2025-39901 being exploited?
There is no confirmed exploitation: CVE-2025-39901 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-39901?
High: CVSS 7.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-39901?
Linux >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 6fd8b30a5cb84d74015bc651799d1ab1e047946c; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < ef40d9411469306e524e7887c51b709377e6ef65; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 70d3dad7d5ad077965d7a63eed1942b7ba49bfb4; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 7d190963b80f4cd99d7008615600aa7cc993c6ba; >= 02e9c290814cc143ceccecb14eac3e7a05da745e, < 9fcdb1c3c4ba134434694c001dbff343f1ffa319; Linux 3.12.
Is there a fix for CVE-2025-39901?
Yes. Fixed in Linux 6fd8b30a5cb84d74015bc651799d1ab1e047946c, Linux 70d3dad7d5ad077965d7a63eed1942b7ba49bfb4, Linux 7d190963b80f4cd99d7008615600aa7cc993c6ba, Linux 9fcdb1c3c4ba134434694c001dbff343f1ffa319. Upgrade Linux to 9fcdb1c3c4ba134434694c001dbff343f1ffa319 or later.
How do I check if I'm affected by CVE-2025-39901?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.