Skip to contentSkip to conversation

CVE-2026-53266: netfilter: bridge: make ebt_snat ARP rewrite writable

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jun 25

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

netfilter: bridge: make ebt_snat ARP rewrite writable

The ebtables SNAT target keeps the Ethernet source address rewrite behind skb_ensure_writable(skb, 0). This is intentional: at the bridge ebtables hooks the Ethernet header is addressed through skb_mac_header()/eth_hdr(), while skb->data points at the Ethernet payload. Asking skb_ensure_writable() for ETH_HLEN bytes would check the payload, not the Ethernet header, and would reintroduce the small packet regression fixed by commit 63137bc5882a.

However, the optional ARP sender hardware address rewrite is different. It writes through skb_store_bits() at an offset relative to skb->data:

        skb_store_bits(skb, sizeof(struct arphdr), info->mac, ETH_ALEN)

skb_header_pointer() only safely reads the ARP header; it does not make the later sender hardware address range writable. If that range is still held in a nonlinear skb fragment backed by a splice-imported file page, skb_store_bits() maps the frag page and copies the new MAC address directly into it.

Ensure the ARP SHA range is writable before reading the ARP header and before calling skb_store_bits().

The Linux kernel CVE team has assigned CVE-2026-53266 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.10 with commit 63137bc5882a1882c553d389fdeeeace86ee1741 and fixed in 5.10.259 with commit bf84ad7c7a9ede46e31afaa41a1ba06a159e8c87
	Issue introduced in 5.10 with commit 63137bc5882a1882c553d389fdeeeace86ee1741 and fixed in 5.15.210 with commit 76280b78cc9f23bdc6438e10ad6dff148ef8375b
	Issue introduced in 5.10 with commit 63137bc5882a1882c553d389fdeeeace86ee1741 and fixed in 6.1.176 with commit b7e91939ba9be805a62a257fa4e227dffbb88fa0
	Issue introduced in 5.10 with commit 63137bc5882a1882c553d389fdeeeace86ee1741 and fixed in 6.6.143 with commit afd64b59c3de9bbbdd3759e834fdc55cda716e0b
	Issue introduced in 5.10 with commit 63137bc5882a1882c553d389fdeeeace86ee1741 and fixed in 6.12.94 with commit 153ea96c806aea395daba907a4f88480b6ad5093
	Issue introduced in 5.10 with commit 63137bc5882a1882c553d389fdeeeace86ee1741 and fixed in 6.18.36 with commit b18675263db1147c8e1cab625400c13a0d87bd2d
	Issue introduced in 5.10 with commit 63137bc5882a1882c553d389fdeeeace86ee1741 and fixed in 7.0.13 with commit c9b5ff59feffb92a147a84a5aa28acd2cb8ff4c5
	Issue introduced in 5.10 with commit 63137bc5882a1882c553d389fdeeeace86ee1741 and fixed in 7.1 with commit 67ba971ae02514d85818fe0c32549ab4bfa3bf49
	Issue introduced in 5.4.73 with commit 2f3839075a5f8dcf116c1abe35b36b018ac62445
	Issue introduced in 5.8.17 with commit 51ba2945a8ef65ae437c8f9ba05f0343aa82ae5b
	Issue introduced in 5.9.2 with commit b7d23c2c87584eb429f115c078ed511be8b18e29

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-53266

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_snat.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/bf84ad7c7a9ede46e31afaa41a1ba06a159e8c87
	https://git.kernel.org/stable/c/76280b78cc9f23bdc6438e10ad6dff148ef8375b
	https://git.kernel.org/stable/c/b7e91939ba9be805a62a257fa4e227dffbb88fa0
	https://git.kernel.org/stable/c/afd64b59c3de9bbbdd3759e834fdc55cda716e0b
	https://git.kernel.org/stable/c/153ea96c806aea395daba907a4f88480b6ad5093
	https://git.kernel.org/stable/c/b18675263db1147c8e1cab625400c13a0d87bd2d
	https://git.kernel.org/stable/c/c9b5ff59feffb92a147a84a5aa28acd2cb8ff4c5
	https://git.kernel.org/stable/c/67ba971ae02514d85818fe0c32549ab4bfa3bf49