netfilter: flowtable: publish GC-visible tuple last
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ac2a66665e231847cab11b8c8e844ce43207dd2e · < d9d3050a70efe217e73a0751e55fdae6a7092620| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: flowtable: publish GC-visible tuple last
nf_flow_table_iterate() only treats original-direction tuple nodes as owning entries. Publishing the original node first lets GC observe and free a flow while flow_offload_add() is still inserting the reply node. Publish the reply node first and the original node last so GC never sees a partially installed flow.
KASAN can trigger slab-use-after-free read and write reports in the flowtable/rhashtable path (rht_deferred_worker, jhash, flow_offload_del, flow_offload_lookup, etc.).
From the CVE record · Linux
A race in the Linux kernel netfilter flowtable can let garbage collection free a flow while it is still being inserted, causing use-after-free reads and writes. An attacker who can trigger the race may cause these memory errors; the input does not specify whether access is network or local, whether authentication is needed, or whether user interaction is required.
Anyone running the Linux kernel should check their version; affected versions are not specified.