Skip to contentSkip to conversation

bpf: fix out-of-bounds write in bpf_bprintf_prepare with %pI4/%pI6

PATCH Ibrahim Zein 1 participant 1 message Mar 19 1 message not in the archive BPF

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi Paul,

Apologies for dropping the list from CC, I will keep everyone in copy.

Regarding the (size_t) cast: agreed, I will remove it in v4.

Regarding the test: you are right. BPF_SNPRINTF is limited to 12 arguments, which is not enough to fill 512 bytes of bin_args with scalar args alone to trigger the overflow path.

Would it be acceptable to keep the test as a regression test for correct %pI4/%pI6 formatting, or should I remove it entirely?

Best regards,
Ibrahim Zein