Files
linux/kernel/bpf
Junyoung Jang 3ac1a467e3 bpf: Fix off-by-one boundary validation in arena direct-value access
BPF_MAP_TYPE_ARENA accepts BPF_PSEUDO_MAP_VALUE offsets at exactly
the end of the arena mapping (off == arena_size). The boundary check
in arena_map_direct_value_addr() uses `>` instead of `>=`, which
incorrectly allows a one-past-end pointer to be accepted.

Change the condition to `>=` to correctly reject offsets that fall
outside the valid arena user_vm range.

Fixes: 317460317a ("bpf: Introduce bpf_arena.")
Signed-off-by: Junyoung Jang <graypanda.inzag@gmail.com>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Link: https://lore.kernel.org/r/20260426172505.1947915-1-graypanda.inzag@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-05-09 16:18:39 -07:00
..
2024-08-30 08:55:26 -07:00
2024-08-30 08:55:26 -07:00
2026-04-12 12:36:45 -07:00
2026-04-10 15:13:38 -07:00
2024-08-30 08:55:26 -07:00
2024-08-30 08:57:47 -07:00
2026-04-16 07:03:40 -07:00
2026-03-24 08:45:29 -07:00