Unverified Commit a6bb214f authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5787 bpf: fix check for attempt to corrupt spilled pointer

parents 153a05b7 b6ff704c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2500,7 +2500,7 @@ static int check_stack_write_fixed_off(struct bpf_verifier_env *env,
	 * so it's aligned access and [off, off + size) are within stack limits
	 */
	if (!env->allow_ptr_leaks &&
	    state->stack[spi].slot_type[0] == STACK_SPILL &&
	    is_spilled_reg(&state->stack[spi]) &&
	    size != BPF_REG_SIZE) {
		verbose(env, "attempt to corrupt spilled pointer on stack\n");
		return -EACCES;