Files
linux/kernel
Eduard Zingerman e51179a4e0 bpf: Don't predict JMP32 pointer vs zero comparisons
Consider the following program:

        r1 = map_value;      /* low 32 bits are zero at runtime */
        r6 = 0xdead000000000000;
        if w1 != 0 goto l1;
    l0: r1 += r6;
        r2 = *(u64 *)(r1 + 0);
        exit;
    l1: r6 = 0;
        goto l0;

At the moment is_branch_taken() reports the jump as always taken,
because it does not distinguish between BPF_JMP and BPF_JMP32
comparisons when processing 'if w1 != 0 ...'.

Fixes: cac616db39 ("bpf: Verifier track null pointer branch_taken with JNE and JEQ")
Reported-by: Nicholas Carlini <npc@anthropic.com>
Suggested-by: Nicholas Carlini <npc@anthropic.com>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/bpf/20260904083325.2083493-5-eddyz87@gmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-09-04 12:58:04 +02:00
..
2026-08-14 16:12:58 +02:00
2026-07-20 20:38:40 +02:00
2026-08-04 10:51:49 +03:00
2026-06-02 15:36:06 +02:00
2025-10-29 10:29:54 +01:00
2026-01-26 19:07:13 -08:00