CVE-2026-53220: netfilter: revalidate bridge ports
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfilter: revalidate bridge ports
ebt_redirect_tg() dereferences br_port_get_rcu() return without a NULL check, causing a kernel panic when the bridge port has been removed between the original hook invocation and an NFQUEUE reinject.
A mere NULL check isn't sufficient, however. As sashiko review points out userspace can not only remove the port from the bridge, it could also place the device in a different virtual device, e.g. macvlan.
If this happens, we must drop the packet, there is no way for us to reinject it into the bridge path.
Switch to _upper API, we don't need the bridge port structure. Also, this fix keeps another bug intact:
Both nfnetlink_log and nfnetlink_queue use CONFIG_BRIDGE_NETFILTER too aggressive, which prevents certain logging features when queueing in bridge family: NETFILTER_FAMILY_BRIDGE can be enabled while the old CONFIG_BRIDGE_NETFILTER cruft is off.
Fixes tag is a common ancestor, this was always broken.
The Linux kernel CVE team has assigned CVE-2026-53220 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.36 with commit f350a0a87374418635689471606454abc7beaa3a and fixed in 6.12.94 with commit 43330a1e8aace6b5a8de9aba127e9e394ab49b0f Issue introduced in 2.6.36 with commit f350a0a87374418635689471606454abc7beaa3a and fixed in 6.18.36 with commit 4beffcd726e2a731cea4dc18e1fbc55c8d76f1a0 Issue introduced in 2.6.36 with commit f350a0a87374418635689471606454abc7beaa3a and fixed in 7.0.13 with commit d4b1301fd3c9e5e105fd3767c68bc4ba558bb228 Issue introduced in 2.6.36 with commit f350a0a87374418635689471606454abc7beaa3a and fixed in 7.1 with commit ccb9fd4b87538ccf19ccff78ee26700526d94867
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-53220
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/bridge/netfilter/ebt_dnat.c
net/bridge/netfilter/ebt_redirect.c
net/netfilter/nfnetlink_log.c
net/netfilter/nfnetlink_queue.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/43330a1e8aace6b5a8de9aba127e9e394ab49b0f https://git.kernel.org/stable/c/4beffcd726e2a731cea4dc18e1fbc55c8d76f1a0 https://git.kernel.org/stable/c/d4b1301fd3c9e5e105fd3767c68bc4ba558bb228 https://git.kernel.org/stable/c/ccb9fd4b87538ccf19ccff78ee26700526d94867