Skip to content

Commit 85656b5

Browse files
pchaignoKernel Patches Daemon
authored andcommitted
bpf: Improve ctx access verifier error message
We've already had two "error during ctx access conversion" warnings triggered by syzkaller. Let's improve the error message by dumping the cnt variable so that we can more easily differentiate between the different error cases. Signed-off-by: Paul Chaignon <[email protected]>
1 parent fa546bc commit 85656b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/bpf/verifier.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21445,7 +21445,7 @@ static int convert_ctx_accesses(struct bpf_verifier_env *env)
2144521445
&target_size);
2144621446
if (cnt == 0 || cnt >= INSN_BUF_SIZE ||
2144721447
(ctx_field_size && !target_size)) {
21448-
verifier_bug(env, "error during ctx access conversion");
21448+
verifier_bug(env, "error during ctx access conversion (%d)", cnt);
2144921449
return -EFAULT;
2145021450
}
2145121451

0 commit comments

Comments
 (0)