diff options
| author | Florian Westphal <fw@strlen.de> | 2026-06-09 13:51:53 +0200 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2026-06-30 06:45:45 +0200 |
| commit | 54f34607d184c1cc056c59a5b3d86d96dd6a515c (patch) | |
| tree | dd3687a98568825c5ff0ed25058fe22fdd455292 /rust/zerocopy/git@git.tavy.me:linux-stable.git | |
| parent | d07955dd34ecae17d35d8c7d0a273a3fba653a8c (diff) | |
netfilter: nfnetlink_queue: restrict writes to network header
nfnetlink_queue doesn't allow selective replacements of some part of the
payload, only complete replacement.
If the new data is shorter, skb is trimmed, otherwise expanded.
Add minimal validation of the new ip/ipv6 header. Check total len
matches skb length. Disallow ip option modifications.
IPv6 extension headers are also disabled.
IP options and exthdrs could be allowed later after validation pass or
ip option recompile.
Transport header is not checked.
Bridge modifications are rejected. Given userspace doesn't even receive
L2 headers, use is limited and I don't think there are any users of
bridge nfnetlink_queue, let alone users that modifiy payload.
Arp isn't supported at all.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'rust/zerocopy/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
