From 37581a583945096169854e119f25e8ed68d8214b Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Wed, 31 Jul 2024 20:38:15 +0300 Subject: [PATCH] [bpf] Fix unintended fall-through when zeroing out unused insn fields --- runtime/bpffuzz.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/bpffuzz.c b/runtime/bpffuzz.c index bcaec02..b5e13c3 100644 --- a/runtime/bpffuzz.c +++ b/runtime/bpffuzz.c @@ -62,11 +62,14 @@ static void clear_unused_fields(struct bpf_insn insns[], size_t length) { } case BPF_LD: insns[i].off = 0; + break; case BPF_ST: insns[i].src_reg = 0; + break; case BPF_LDX: case BPF_STX: insns[i].imm = 0; + break; default: break; }