HIGH Introduced in 5.7
netfilter FlowOffload UAF
CVE-2026-98625
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: netfilter: flowtable: publish HW_DEAD after worker is done flow_offload_work_del() sets NF_FLOW_HW_DEAD before the work handler clears NF_FLOW_HW_PENDING. Once a flow is both HW_DYING and HW_DEAD, a concurrent garbage collection pass can remove it and schedule it for RCU freeing. The offload worker holds neither an RCU read lock nor a reference to the flow. If it is preempted after publishing HW_DEAD, the RCU callback can free the flow before the worker resumes and clears HW_PENDING, resulting in a use-after-free. Move HW_DEAD publication to the common worker epilogue after the pending bit is cleared, making it the final flow access by destroy work. Order all preceding flow accesses before publishing the bit that allows garbage collection to free the object.
02KernelScan AI Analysis
Risk summary
A local attacker with CAP_NET_ADMIN (obtainable in a user namespace) can trigger a race condition in the netfilter flowtable hardware offload path, causing a use-after-free that may lead to kernel privilege escalation or denial of service. The bug is reachable when hardware flow offload is configured and active.
Vulnerability analysis
The netfilter flowtable offload subsystem uses a pair of flags (HW_DYING and HW_DEAD) to coordinate destruction of offloaded flows between a garbage-collection thread and a worker thread. The original code published the HW_DEAD flag before the worker finished clearing the HW_PENDING flag, creating a window where the garbage collector could see both flags set, remove the flow, and schedule it for RCU freeing while the worker was still using the flow object. If the worker was preempted in this window, it would resume on a freed object, causing a use-after-free. The fix reorders the operations so that HW_DEAD is published only after the worker has cleared HW_PENDING and completed all flow accesses, with a memory barrier to ensure ordering. An attacker needs local access and CAP_NET_ADMIN (available in a user namespace) to configure flowtable offload and trigger the race.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.7 | 5.10.271 | f92e8f39726b |
| 5.15 | 5.7 | 5.15.222 | 00e452a7ca9f |
| 6.1 | 5.7 | 6.1.189 | 56f39c7d139b |
| 6.12 | 5.7 | 6.12.112 | b4f0f05dfbe8 |
| 6.18 | 5.7 | 6.18.55 | b0ef9450e93f |
| 6.6 | 5.7 | 6.6.158 | e20701843032 |
| 7.2 | 5.7 | 7.2.9 | f26652e99f51 |
| mainline | 5.7 | 7.3 | d644b23afe1e |
| cip/5.10 | 5.7 | 5.10.271-cip78 | f92e8f39726b |
| cip/5.10-rt | 5.7 | 5.10.272-cip79-rt35 | f92e8f39726b |
| cip/6.1 | 5.7 | 6.1.189-cip61 | 56f39c7d139b |
| cip/6.1-rt | 5.7 | 6.1.189-cip61-rt32 | 56f39c7d139b |
| cip/6.12 | 5.7 | 6.12.112-cip33 | b4f0f05dfbe8 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.112-cip33 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Fixed in 5.10.272-cip79-rt35 |