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

Alexander Lobakin
2025-01-13T12:32:34Z

From: Dan Carpenter <dan.carpenter@linaro.org>
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@linaro.org>

Thanks,
Olek