linux-IllusionX/net/xdp
Magnus Karlsson 53ea2076d8 xsk: Fix possible segfault in xsk umem diagnostics
Fix possible segfault in the xsk diagnostics code when dumping
information about the umem. This can happen when a umem has been
created, but the socket has not been bound yet. In this case, the xsk
buffer pool does not exist yet and we cannot dump the information
that was moved from the umem to the buffer pool. Fix this by testing
for the existence of the buffer pool and if not there, do not dump any
of that information.

Fixes: c2d3d6a474 ("xsk: Move queue_id, dev and need_wakeup to buffer pool")
Fixes: 7361f9c3d7 ("xsk: Move fill and completion rings to buffer pool")
Reported-by: syzbot+3f04d36b7336f7868066@syzkaller.appspotmail.com
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/1599036743-26454-1-git-send-email-magnus.karlsson@intel.com
2020-09-02 16:49:40 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile xsk: Introduce AF_XDP buffer allocation API 2020-05-21 17:31:26 -07:00
xdp_umem.c xsk: Enable sharing of dma mappings 2020-08-31 21:15:04 +02:00
xdp_umem.h xsk: Move xsk_tx_list and its lock to buffer pool 2020-08-31 21:15:04 +02:00
xsk.c xsk: Add shared umem support between devices 2020-08-31 21:15:04 +02:00
xsk.h xsk: Move queue_id, dev and need_wakeup to buffer pool 2020-08-31 21:15:04 +02:00
xsk_buff_pool.c xsk: Add shared umem support between queue ids 2020-08-31 21:15:04 +02:00
xsk_diag.c xsk: Fix possible segfault in xsk umem diagnostics 2020-09-02 16:49:40 +02:00
xsk_queue.c xsk: Remove MEM_TYPE_ZERO_COPY and corresponding code 2020-05-21 17:31:27 -07:00
xsk_queue.h xsk: Create and free buffer pool independently from umem 2020-08-31 21:15:04 +02:00
xskmap.c bpf: Relax max_entries check for most of the inner map types 2020-08-28 15:41:30 +02:00