aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorMagnus Karlsson <[email protected]>2019-10-21 08:16:58 +0000
committerAlexei Starovoitov <[email protected]>2019-10-24 03:22:11 +0000
commit2afd23f78f39da84937006ecd24aa664a4ab052b (patch)
tree3c042b80af88bd4aa97fd25a7069935153817be4 /net/tipc
parentbpf: Fix use after free in bpf_get_prog_name (diff)
downloadkernel-2afd23f78f39da84937006ecd24aa664a4ab052b.tar.gz
kernel-2afd23f78f39da84937006ecd24aa664a4ab052b.zip
xsk: Fix registration of Rx-only sockets
Having Rx-only AF_XDP sockets can potentially lead to a crash in the system by a NULL pointer dereference in xsk_umem_consume_tx(). This function iterates through a list of all sockets tied to a umem and checks if there are any packets to send on the Tx ring. Rx-only sockets do not have a Tx ring, so this will cause a NULL pointer dereference. This will happen if you have registered one or more Rx-only sockets to a umem and the driver is checking the Tx ring even on Rx, or if the XDP_SHARED_UMEM mode is used and there is a mix of Rx-only and other sockets tied to the same umem. Fixed by only putting sockets with a Tx component on the list that xsk_umem_consume_tx() iterates over. Fixes: ac98d8aab61b ("xsk: wire upp Tx zero-copy functions") Reported-by: Kal Cutter Conley <[email protected]> Signed-off-by: Magnus Karlsson <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Jonathan Lemon <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'net/tipc')
0 files changed, 0 insertions, 0 deletions