Files
linux/kernel/bpf
Kumar Kartikeya Dwivedi 7ac6e1ae41 bpf: Zero queue and stack outputs on lock failure
Queue and stack pop/peek helpers accept an uninitialized output buffer
because the verifier expects the helper to initialize it. The empty-map
error path clears the buffer, but a failed lock acquisition returns
-EBUSY without writing it.

Clear the output before returning -EBUSY so BPF programs cannot observe
uninitialized stack contents after a failed helper call.

Fixes: a34a9f1a19 ("bpf: Avoid deadlock when using queue and stack maps from NMI")
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Link: https://lore.kernel.org/bpf/20260719125419.1782196-1-memxor@gmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21 18:55:48 +02:00
..
2024-08-30 08:55:26 -07:00
2024-08-30 08:55:26 -07:00
2024-08-30 08:55:26 -07:00
2024-08-30 08:57:47 -07:00
2026-03-24 08:45:29 -07:00