linux-stable/net/xdp
Kal Conley 580634b03a xsk: Add missing overflow check in xdp_umem_reg
[ Upstream commit c7df4813b1 ]

The number of chunks can overflow u32. Make sure to return -EINVAL on
overflow. Also remove a redundant u32 cast assigning umem->npgs.

Fixes: bbff2f321a ("xsk: new descriptor addressing scheme")
Signed-off-by: Kal Conley <kal.conley@dectris.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/20230308174013.1114745-1-kal.conley@dectris.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-05 11:23:32 +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: Add missing overflow check in xdp_umem_reg 2023-04-05 11:23:32 +02:00
xdp_umem.h xsk: Fix umem cleanup bug at socket destruct 2020-11-20 15:52:39 +01:00
xsk.c xsk: Inherit need_wakeup flag for shared sockets 2022-10-15 07:55:51 +02:00
xsk.h xsk: Fix possible segfault at xskmap entry insertion 2020-09-02 16:52:59 +02:00
xsk_buff_pool.c xsk: Inherit need_wakeup flag for shared sockets 2022-10-15 07:55:51 +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: Fix broken Tx ring validation 2021-07-14 16:56:23 +02:00
xskmap.c bpf: Allow for map-in-map with dynamic inner array map entries 2020-10-11 10:21:04 -07:00