netfilter: nf_tables: use timestamp to check for set element timeout
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c3e1b005ed1cc068fc9d454a6e745830d55d251d · < 7fa2e2960fff8322ce2ded57b5f8e9cbc450b967| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_tables: use timestamp to check for set element timeout
Add a timestamp field at the beginning of the transaction, store it in the nftables per-netns area.
Update set backend .insert, .deactivate and sync gc path to use the timestamp, this avoids that an element expires while control plane transaction is still unfinished.
.lookup and .update, which are used from packet path, still use the current time to check if the element has expired. And .get path and dump also since this runs lockless under rcu read size lock. Then, there is async gc which also needs to check the current time since it runs asynchronously from a workqueue.
From the CVE record · Linux
The Linux kernel’s nf_tables set-element timeout handling can allow an element to expire while a control-plane transaction is unfinished, creating a use-after-free vulnerability. The input does not specify how an attacker could trigger or exploit it, or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with nf_tables should check their versions against the vendor advisory; affected versions are not specified in the input.