netfilter: nfnetlink_log: cope with concurrent instance destruction
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0597f2680d666a3bcf101ac0c771ba7e50016bbd · < 1a7a8ac9a9f0ad0d410c901cb6f233833518844c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nfnetlink_log: cope with concurrent instance destruction
Instances are refcounted. However, only memory release happens on the 1 -> 0 transition; the unlink from hashes can occur with any refcount.
Uncooperative userspace can force a situation where a queue is pending for destruction from netlink event while a different socket with same portid processes an UNBIND request.
With right timing, this will unhash the instance again:
Oops: general protection fault, [..] Call Trace: <TASK> nfulnl_recv_config+0x31a/0xd50 nfnetlink_rcv_msg+0x7c2/0xeb0
From the CVE record · Linux
The Linux kernel's nfnetlink_log can unlink an instance twice during concurrent destruction. Local userspace can trigger a kernel fault with the right timing when a queue is pending for destruction from a netlink event and a different socket with the same portid processes an UNBIND request.
Engineers running Linux kernels with nfnetlink_log should check their vendor's advisory for affected versions.