From: Alexei Starovoitov The blamed commit made __is_pointer_value() use is_pointer_regtype(), which is false for NOT_INIT. mark_reg_invalid() can set a spilled register to NOT_INIT, and check_stack_read_fixed_off() must not handle such a spill like a spilled scalar. Go back to the check for SCALAR_VALUE. Fixes: 1f737e46ca6a ("bpf: Remove artificial limitations on pointer types eligible for spilling") Signed-off-by: Alexei Starovoitov --- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index dbd9a21977fb..219173a46110 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -3825,7 +3825,7 @@ static bool __is_pointer_value(bool allow_ptr_leaks, if (allow_ptr_leaks) return false; - return is_pointer_regtype(reg->type); + return reg->type != SCALAR_VALUE; } static void assign_scalar_id_before_mov(struct bpf_verifier_env *env, -- 2.55.0