Vulnerability · Published Oct 1, 2025 · Assigned by Linux

CVE-2025-39901i40e: remove read access to debugfs files

High 7.1

In plain English

A high-severity out-of-bounds read in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 5% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.1High
Exploit odds (30 days)0.2%top 95.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.187-1DEBIAN-CVE-2025-39901
Debian:13linux6.12.48-1DEBIAN-CVE-2025-39901
Debian:14linux6.16.6-1DEBIAN-CVE-2025-39901
Ubuntu:22.04:LTSlinuxno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux6.8.0-106.106UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-awsno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-aws6.8.0-1050.53UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-aws-6.14no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1050.53~22.04.1UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-azureno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-azure6.8.0-1051.57UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-azure-6.14no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-azure-fdeno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-azure-fde6.8.0-1058.65UBUNTU-CVE-2025-39901
Ubuntu:25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-azure-fde-6.14no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-azure-fde-6.86.8.0-1058.65~22.04.1UBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-azure-nvidiano fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-azure-nvidia-6.14no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-gcpno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-gcp6.8.0-1052.55UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-gcp-6.14no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1052.55~22.04.1UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-gkeno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-gke6.8.0-1048.53UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-gkeopno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1035.38UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-hwe-6.14no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-106.106~22.04.1UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-ibmno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-ibm6.8.0-1049.49UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1049.49~22.04.1UBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-intelno fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-intel-iotgno fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-kvmno fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-lowlatencyno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-106.106.1UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-106.106.1~22.04.1UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-nvidiano fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1049.52UBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-nvidia-6.11no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1049.52~22.04.1UBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1049.52.1UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-nvidia-tegrano fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-nvidia-tegra6.8.0-1020.20UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-nvidia-tegra-igxno fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-oem-6.11no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-oem-6.14no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-oem-6.8no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-oracleno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-oracle6.8.0-1047.48UBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-oracle-6.14no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1047.48~22.04.1UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-raspino fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-raspi6.8.0-1050.54UBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-riscv-6.14no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-106.106~22.04.1UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-39901
Ubuntu:24.04:LTSlinux-xilinx6.8.0-1028.29UBUNTU-CVE-2025-39901
Ubuntu:22.04:LTSlinux-xilinx-zynqmpno fix listedUBUNTU-CVE-2025-39901

Affected products (as reported)

VendorProductVersions
Linux Linux 02e9c290814cc143ceccecb14eac3e7a05da745e – before 6fd8b30a5cb84d74015bc651799d1ab1e047946c02e9c290814cc143ceccecb14eac3e7a05da745e – before ef40d9411469306e524e7887c51b709377e6ef6502e9c290814cc143ceccecb14eac3e7a05da745e – before 70d3dad7d5ad077965d7a63eed1942b7ba49bfb402e9c290814cc143ceccecb14eac3e7a05da745e – before 7d190963b80f4cd99d7008615600aa7cc993c6ba02e9c290814cc143ceccecb14eac3e7a05da745e – before 9fcdb1c3c4ba134434694c001dbff343f1ffa319
Linux Linux 3.12

Weakness: CWE-125 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

References