Skip to content
Snippets Groups Projects
Commit b79c730c authored by Luis Gerhorst's avatar Luis Gerhorst
Browse files

[DRAFT] bpf: Prevent limit sanitization-error using nospec_v1_result

parent a6955bbf
No related branches found
No related tags found
No related merge requests found
......@@ -11787,9 +11787,11 @@ static int sanitize_err(struct bpf_verifier_env *env,
aux->alu_state = 0;
return 0;
case REASON_LIMIT:
verbose(env, "R%d tried to %s beyond pointer bounds, %s\n",
dst, op, err);
break;
/* Register tried access beyond pointer bounds. */
WARN_ON_ONCE(env->cur_state->speculative);
aux->nospec_v1_result = true;
aux->alu_state = 0;
return 0;
case REASON_STACK:
verbose(env, "R%d could not be pushed for speculative verification, %s\n",
dst, err);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment