diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 77e4b5223867a2f5ca6f49454ab16cb7e3f22df2..102c519836f61c7deea6f789cebb24030d12154f 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -1059,6 +1059,11 @@ static int check_ptr_alignment(struct bpf_verifier_env *env, break; case PTR_TO_STACK: pointer_desc = "stack "; + /* The stack spill tracking logic in check_stack_write() + * and check_stack_read() relies on stack accesses being + * aligned. + */ + strict = true; break; default: break;