netfilter: nfnetlink_queue: hold nfnl mutex in event notifier
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7af4cc3fa158ff1dda6e7451c7e6afa6b0bb85cb · < 07a3ec8fdc5a1267c00cd6fd1cf8bbb5cda913c1| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nfnetlink_queue: hold nfnl mutex in event notifier
We must serialize the release notifier and the config netlink function. A concurrent thread can issue close() which can call the release function while unrelated socket processes UNBIND request for same portid:
Oops: general protection fault, [..] RIP: 0010:__instance_destroy+0x60/0x210 [nfnetlink_queue] Call Trace: nfqnl_recv_config+0x9b0/0xdc0 [nfnetlink_queue] nfnetlink_rcv_msg+0x7c2/0xeb0 ? __pfx_nfnetlink_rcv_msg+0x10/0x10
After this, parallel UNBIND and URELEASE events are impossible.
This change isn't nice, but its the shortest fix given instances are not refcounted and the nfnetlink config callback drops the rcu read lock early due to need for sleeping allocations.
From the CVE record · Linux
The Linux kernel's nfnetlink_queue component can hit a general protection fault when a socket release occurs concurrently with an UNBIND request for the same port ID. This requires concurrent local socket operations; the input does not specify whether authentication or user interaction is needed.
Engineers running Linux kernels with nfnetlink_queue should check their exposure; affected versions are not specified.