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

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

parent 49ebd5c8
Branches
No related tags found
No related merge requests found
......@@ -11770,9 +11770,11 @@ static int sanitize_err(struct bpf_verifier_env *env,
 
switch (reason) {
case REASON_BOUNDS:
verbose(env, "R%d has unknown scalar with mixed signed bounds, %s\n",
off_reg == dst_reg ? dst : src, err);
break;
/* Register has unknown scalar with mixed signed bounds. */
WARN_ON_ONCE(env->cur_state->speculative);
aux->nospec_v1_result = true;
aux->alu_state = 0;
return 0;
case REASON_TYPE:
/* Register has pointer with unsupported alu operation. */
aux->nospec_v1_result = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment