Commit f914876e authored by Paul Chaignon's avatar Paul Chaignon Committed by Alexei Starovoitov
Browse files

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: default avatarPaul Chaignon <paul.chaignon@gmail.com>
Acked-by: default avatarEduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/cc94316c30dd76fae4a75a664b61a2dbfe68e205.1754039605.git.paul.chaignon@gmail.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 9e6448f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21445,7 +21445,7 @@ static int convert_ctx_accesses(struct bpf_verifier_env *env)
					 &target_size);
		if (cnt == 0 || cnt >= INSN_BUF_SIZE ||
		    (ctx_field_size && !target_size)) {
			verifier_bug(env, "error during ctx access conversion");
			verifier_bug(env, "error during ctx access conversion (%d)", cnt);
			return -EFAULT;
		}