Commit 5f3077d7 authored by Kohei Enju's avatar Kohei Enju Committed by Alexei Starovoitov
Browse files

selftests/bpf: Add selftests for load-acquire/store-release when register number is invalid

syzbot reported out-of-bounds read in check_atomic_load/store() when the
register number is invalid in this context:
    https://syzkaller.appspot.com/bug?extid=a5964227adc0f904549c



To avoid the issue from now on, let's add tests where the register number
is invalid for load-acquire/store-release.

After discussion with Eduard, I decided to use R15 as invalid register
because the actual slab-out-of-bounds read issue occurs when the register
number is R12 or larger.

Signed-off-by: default avatarKohei Enju <enjuk@amazon.com>
Acked-by: default avatarEduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250322045340.18010-6-enjuk@amazon.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent c03bb2fa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment