CVE-2025-39978
Description
In the Linux kernel, the following vulnerability has been resolved:
octeontx2-pf: Fix potential use after free in otx2_tc_add_flow()
This code calls kfree_rcu(new_node, rcu) and then dereferences "new_node" and then dereferences it on the next line. Two lines later, we take a mutex so I don't think this is an RCU safe region. Re-order it to do the dereferences before queuing up the free.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Use-after-free in Linux kernel octeontx2-pf driver: otx2_tc_add_flow() frees node then dereferences it, risking local privilege escalation.
Vulnerability
Details
In the Linux kernel's octeontx2-pf driver, the function otx2_tc_add_flow() contains a use-after-free bug. The code calls kfree_rcu(new_node, rcu) to schedule freeing of the new_node structure, but then immediately dereferences new_node on the next line. Because the RCU grace period may not have elapsed, the memory could be reused, leading to a use-after-free condition. The fix reorders the operations so that all dereferences occur before the kfree_rcu() call [1][2].
Exploitation
An attacker with local access to the system can trigger this vulnerability by adding a TC (traffic control) flow via the affected driver. No special privileges beyond the ability to interact with the network interface may be required, as the code path is reachable from user space through netlink or similar interfaces. The vulnerability does not require physical access or network-based exploitation.
Impact
Successful exploitation could allow an attacker to corrupt kernel memory, potentially leading to privilege escalation or a denial of service (system crash). The exact impact depends on the system configuration and the attacker's ability to control the freed memory.
Mitigation
The fix has been applied to the stable kernel trees as commits [1] and [2]. Users should update their Linux kernel to a version that includes these patches. No workaround is available; updating the kernel is the recommended mitigation.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
55723120423a7df2c071061edc41b2941a024a8a63f27c3a8d9c70e93ec59Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/5723120423a753a220b8b2954b273838b9d7e74anvd
- git.kernel.org/stable/c/a8a63f27c3a8a3714210d32b12fd0f16d0337414nvd
- git.kernel.org/stable/c/c41b2941a024d4ec7c768e16ffb10a74b188fcednvd
- git.kernel.org/stable/c/d9c70e93ec5988ab07ad2a92d9f9d12867f02c56nvd
- git.kernel.org/stable/c/df2c071061ed52d2225d97b212d27ecedf456b8anvd
News mentions
0No linked articles in our index yet.