From: Anton Protopopov Date: Wed, 14 Jan 2026 16:25:43 +0000 (+0000) Subject: bpf: Properly mark live registers for indirect jumps X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1aab1ca576c90192ba961094d51b0be6355a4d6;p=thirdparty%2Flinux.git bpf: Properly mark live registers for indirect jumps For a `gotox rX` instruction the rX register should be marked as used in the compute_insn_live_regs() function. Fix this. Signed-off-by: Anton Protopopov Link: https://lore.kernel.org/r/20260114162544.83253-2-a.s.protopopov@gmail.com Signed-off-by: Alexei Starovoitov --- diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 62ad7c79ce2d2..7a375f608263d 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -24848,6 +24848,12 @@ static void compute_insn_live_regs(struct bpf_verifier_env *env, case BPF_JMP32: switch (code) { case BPF_JA: + def = 0; + if (BPF_SRC(insn->code) == BPF_X) + use = dst; + else + use = 0; + break; case BPF_JCOND: def = 0; use = 0;