Skip to content

Commit 495d0ad

Browse files
bpf: Improve ctx access verifier error message
JIRA: https://issues.redhat.com/browse/RHEL-78204 commit f914876 Author: Paul Chaignon <[email protected]> Date: Fri Aug 1 11:49:15 2025 +0200 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]> Acked-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/cc94316c30dd76fae4a75a664b61a2dbfe68e205.1754039605.git.paul.chaignon@gmail.com Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: Jerome Marchand <[email protected]>
1 parent 9e82d28 commit 495d0ad

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
@@ -21449,7 +21449,7 @@ static int convert_ctx_accesses(struct bpf_verifier_env *env)
2144921449
&target_size);
2145021450
if (cnt == 0 || cnt >= INSN_BUF_SIZE ||
2145121451
(ctx_field_size && !target_size)) {
21452-
verifier_bug(env, "error during ctx access conversion");
21452+
verifier_bug(env, "error during ctx access conversion (%d)", cnt);
2145321453
return -EFAULT;
2145421454
}
2145521455

0 commit comments

Comments
 (0)