mirror of
https://github.com/torvalds/linux.git
synced 2026-09-28 12:02:03 +02:00
xsk_map_gen_lookup() loads a u32 key and compares it with max_entries
using BPF_JMP_IMM. BPF immediates are sign-extended to 64 bits, so a
max_entries value of 0x80000000 or higher becomes a threshold larger
than every zero-extended 32-bit key. An out-of-range index then skips
the bounds check and the generated lookup reads past xsk_map[].
Compare with BPF_JMP32_IMM so the check stays in 32-bit unsigned range.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| xdp_umem.c | ||
| xdp_umem.h | ||
| xsk_buff_pool.c | ||
| xsk_diag.c | ||
| xsk_queue.c | ||
| xsk_queue.h | ||
| xsk.c | ||
| xsk.h | ||
| xskmap.c | ||