1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/netronome/nfp/bpf
Lv Yunlong 6e5a03bcba ethernet/netronome/nfp: Fix a use after free in nfp_bpf_ctrl_msg_rx
In nfp_bpf_ctrl_msg_rx, if
nfp_ccm_get_type(skb) == NFP_CCM_TYPE_BPF_BPF_EVENT is true, the skb
will be freed. But the skb is still used by nfp_ccm_rx(&bpf->ccm, skb).

My patch adds a return when the skb was freed.

Fixes: bcf0cafab4 ("nfp: split out common control message handling code")
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-29 17:09:51 -07:00
..
cmsg.c ethernet/netronome/nfp: Fix a use after free in nfp_bpf_ctrl_msg_rx 2021-03-29 17:09:51 -07:00
fw.h netronome: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
jit.c bpf: Rename BPF_XADD and prepare to encode other atomics in .imm 2021-01-14 18:34:29 -08:00
main.c treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
main.h bpf: Rename BPF_XADD and prepare to encode other atomics in .imm 2021-01-14 18:34:29 -08:00
offload.c bpf: Mutex protect used_maps array and count 2020-09-15 18:28:27 -07:00
verifier.c bpf: Rename BPF_XADD and prepare to encode other atomics in .imm 2021-01-14 18:34:29 -08:00