]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netfilter: nftables: restrict checkum update offset
authorFlorian Westphal <fw@strlen.de>
Tue, 9 Jun 2026 11:51:55 +0000 (13:51 +0200)
committerFlorian Westphal <fw@strlen.de>
Tue, 30 Jun 2026 04:45:53 +0000 (06:45 +0200)
commitc3716a3c43465641ded6e01c0b187de42e87a80d
tree7e96e86f17f9a061772263711e27f99e1d2e65fd
parentdf07998dfd40796a05fff7ffea2661ad65ed42a7
netfilter: nftables: restrict checkum update offset

After previous patch, writes to network header are restricted.
However, there is another way to manipulate the l3 header: The
checksum update function.

Restrict this for network header writes, only the ipv4 header is
allowed.  This needs run-time checks because BRIDGE, INET, NETDEV
families can carry l3 headers other than IP.

checksum updates to the udp/tcp (l4) headers are not restricted.

Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nft_payload.c