CVE-2025-39854: ice: fix NULL access of tx->in_use in ice_ll_ts_intr
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ice: fix NULL access of tx->in_use in ice_ll_ts_intr
Recent versions of the E810 firmware have support for an extra interrupt to handle report of the "low latency" Tx timestamps coming from the specialized low latency firmware interface. Instead of polling the registers, software can wait until the low latency interrupt is fired.
This logic makes use of the Tx timestamp tracking structure, ice_ptp_tx, as it uses the same "ready" bitmap to track which Tx timestamps complete.
Unfortunately, the ice_ll_ts_intr() function does not check if the tracker is initialized before its first access. This results in NULL dereference or use-after-free bugs similar to the issues fixed in the ice_ptp_ts_irq() function.
Fix this by only checking the in_use bitmap (and other fields) if the tracker is marked as initialized. The reset flow will clear the init field under lock before it tears the tracker down, thus preventing any use-after-free or NULL access.
The Linux kernel CVE team has assigned CVE-2025-39854 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.8 with commit 82e71b226e0ef770d7bc143701c8b4960b4eb3d5 and fixed in 6.12.46 with commit 2cde98a02da958357fe240a6ba269b69d913b6ba Issue introduced in 6.8 with commit 82e71b226e0ef770d7bc143701c8b4960b4eb3d5 and fixed in 6.16.6 with commit 923c267bdbb64f65bc1149d184efcf8b047d7d64 Issue introduced in 6.8 with commit 82e71b226e0ef770d7bc143701c8b4960b4eb3d5 and fixed in 6.17-rc5 with commit f6486338fde3f04ed0ec59fe67a69a208c32734f
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-39854
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/net/ethernet/intel/ice/ice_main.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/2cde98a02da958357fe240a6ba269b69d913b6ba https://git.kernel.org/stable/c/923c267bdbb64f65bc1149d184efcf8b047d7d64 https://git.kernel.org/stable/c/f6486338fde3f04ed0ec59fe67a69a208c32734f