summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorHyunwoo Kim <imv4bel@gmail.com>2026-03-08 02:24:06 +0900
committerFlorian Westphal <fw@strlen.de>2026-03-10 14:10:42 +0100
commitf1ba83755d81c6fc66ac7acd723d238f974091e9 (patch)
tree002ea99ecd2257cee892d699202da0ddb9b0ac3e /tools/perf/scripts/python
parentcfe770220ac2dbd3e104c6b45094037455da81d4 (diff)
downloadlinux-f1ba83755d81c6fc66ac7acd723d238f974091e9.tar.gz
linux-f1ba83755d81c6fc66ac7acd723d238f974091e9.zip
netfilter: nfnetlink_queue: fix entry leak in bridge verdict error path
nfqnl_recv_verdict() calls find_dequeue_entry() to remove the queue entry from the queue data structures, taking ownership of the entry. For PF_BRIDGE packets, it then calls nfqa_parse_bridge() to parse VLAN attributes. If nfqa_parse_bridge() returns an error (e.g. NFQA_VLAN present but NFQA_VLAN_TCI missing), the function returns immediately without freeing the dequeued entry or its sk_buff. This leaks the nf_queue_entry, its associated sk_buff, and all held references (net_device refcounts, struct net refcount). Repeated triggering exhausts kernel memory. Fix this by dropping the entry via nfqnl_reinject() with NF_DROP verdict on the error path, consistent with other error handling in this file. Fixes: 8d45ff22f1b4 ("netfilter: bridge: nf queue verdict to use NFQA_VLAN and NFQA_L2HDR") Reviewed-by: David Dull <monderasdor@gmail.com> Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions