Re: [PATCH net] nfp: bpf: prevent integer overflow in nfp_bpf_event_output()

From: Alexander Lobakin
Date: Mon Jan 13 2025 - 07:32:49 EST


From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date: Mon, 13 Jan 2025 09:18:39 +0300

> The "sizeof(struct cmsg_bpf_event) + pkt_size + data_size" math could
> potentially have an integer wrapping bug on 32bit systems. Check for

Not in practice I suppose? Do we need to fix "never" bugs?

> this and return an error.
>
> Fixes: 9816dd35ecec ("nfp: bpf: perf event output helpers support")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Thanks,
Olek