summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorJenny Guanni Qu <qguanni@gmail.com>2026-03-06 19:12:38 +0000
committerFlorian Westphal <fw@strlen.de>2026-03-10 14:10:42 +0100
commitd6d8cd2db236a9dd13dbc2d05843b3445cc964b5 (patch)
tree9cdd996de61081870d9a828d37de6aab282b6f62 /tools/perf/scripts/python/bin
parent7cb9a23d7ae40a702577d3d8bacb7026f04ac2a9 (diff)
downloadlinux-d6d8cd2db236a9dd13dbc2d05843b3445cc964b5.tar.gz
linux-d6d8cd2db236a9dd13dbc2d05843b3445cc964b5.zip
netfilter: nft_set_pipapo: fix stack out-of-bounds read in pipapo_drop()
pipapo_drop() passes rulemap[i + 1].n to pipapo_unmap() as the to_offset argument on every iteration, including the last one where i == m->field_count - 1. This reads one element past the end of the stack-allocated rulemap array (declared as rulemap[NFT_PIPAPO_MAX_FIELDS] with NFT_PIPAPO_MAX_FIELDS == 16). Although pipapo_unmap() returns early when is_last is true without using the to_offset value, the argument is evaluated at the call site before the function body executes, making this a genuine out-of-bounds stack read confirmed by KASAN: BUG: KASAN: stack-out-of-bounds in pipapo_drop+0x50c/0x57c [nf_tables] Read of size 4 at addr ffff8000810e71a4 This frame has 1 object: [32, 160) 'rulemap' The buggy address is at offset 164 -- exactly 4 bytes past the end of the rulemap array. Pass 0 instead of rulemap[i + 1].n on the last iteration to avoid the out-of-bounds read. Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges") Signed-off-by: Jenny Guanni Qu <qguanni@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions