summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2026-06-09 13:51:54 +0200
committerFlorian Westphal <fw@strlen.de>2026-06-30 06:45:53 +0200
commitdf07998dfd40796a05fff7ffea2661ad65ed42a7 (patch)
tree8b5d2617f3c4377e54d0b1119d71ddc98529a641 /tools/perf/scripts/python/stackcollapse.py
parent54f34607d184c1cc056c59a5b3d86d96dd6a515c (diff)
netfilter: nftables: restrict linklayer and network header writes
Don't permit arbitrary writes to linklayer and network header data. Several spots in network stack trust header validation performed in ipv4/ipv6 before PRE_ROUTING hook. For linklayer, allow writes for netdev ingress. For other hooks, only allow link layer writes that do not spill into network header. For network header, check the offset/length combinations: - changing dscp requires store at offset 0 for checsum fixups, so make sure ip version + length field isn't altered. - ip6 dscp starts directly after the version field, so make sure it remains 6. Several of these checks could already be done at rule insertion time. Risk is that this might cause ruleset load failures for existing rulesets. With this change such writes are silently skipped and packet passes unchanged. Transport and inner header bases are not checked / restricted. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions