Skip to content
Commit 16ebb6f5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski
Browse files

nfp: bpf: prevent integer overflow in nfp_bpf_event_output()



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

Fixes: 9816dd35 ("nfp: bpf: perf event output helpers support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/6074805b-e78d-4b8a-bf05-e929b5377c28@stanley.mountain


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f62bb887
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment