Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit f2bcd05e authored by Andrey Ignatov's avatar Andrey Ignatov Committed by Daniel Borkmann
Browse files

bpf: Reject indirect var_off stack access in raw mode

It's hard to guarantee that whole memory is marked as initialized on
helper return if uninitialized stack is accessed with variable offset
since specific bounds are unknown to verifier. This may cause
uninitialized stack leaking.

Reject such an access in check_stack_boundary to prevent possible
leaking.

There are no known use-cases for indirect uninitialized stack access
with variable offset so it shouldn't break anything.

Fixes: 2011fccf

 ("bpf: Support variable offset stack access from helpers")
Reported-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarAndrey Ignatov <rdna@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 636e78b1
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment