diff options
| author | Zhengchuan Liang <zcliangcn@gmail.com> | 2026-04-04 17:39:48 +0800 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2026-04-10 12:16:27 +0200 |
| commit | 62443dc21114c0bbc476fa62973db89743f2f137 (patch) | |
| tree | 66e6844ea383b101aaec9e64d94f18284967b83c /tools/testing/vma/include/git@git.tavy.me:linux.git | |
| parent | 1dfd95bdf4d18d263aa8fad06bfb9f4d9c992b18 (diff) | |
netfilter: require Ethernet MAC header before using eth_hdr()
`ip6t_eui64`, `xt_mac`, the `bitmap:ip,mac`, `hash:ip,mac`, and
`hash:mac` ipset types, and `nf_log_syslog` access `eth_hdr(skb)`
after either assuming that the skb is associated with an Ethernet
device or checking only that the `ETH_HLEN` bytes at
`skb_mac_header(skb)` lie between `skb->head` and `skb->data`.
Make these paths first verify that the skb is associated with an
Ethernet device, that the MAC header was set, and that it spans at
least a full Ethernet header before accessing `eth_hdr(skb)`.
Suggested-by: Florian Westphal <fw@strlen.de>
Tested-by: Ren Wei <enjou1224z@gmail.com>
Signed-off-by: Zhengchuan Liang <zcliangcn@gmail.com>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tools/testing/vma/include/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
