Skip to content

Commit

Permalink
[bpf] Fix unintended fall-through when zeroing out unused insn fields
Browse files Browse the repository at this point in the history
  • Loading branch information
atrosinenko committed Aug 1, 2024
1 parent 9261e9d commit 37581a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/bpffuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 37581a5

Please sign in to comment.