linux-stable/net/xdp
Kal Conley a069909acc 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-03-30 12:49:02 +02:00
..
Kconfig
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-03-30 12:49:02 +02:00
xdp_umem.h xsk: Fix umem cleanup bug at socket destruct 2020-11-20 15:52:39 +01:00
xsk.c xsk: check IFF_UP earlier in Tx path 2023-03-10 09:33:06 +01:00
xsk.h xdp: Add proper __rcu annotations to redirect map entries 2021-06-24 19:41:15 +02:00
xsk_buff_pool.c xsk: Inherit need_wakeup flag for shared sockets 2022-09-22 17:16:22 +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 backpressure mechanism on Tx 2022-08-31 20:52:09 +02:00
xskmap.c bpf: Compute map_btf_id during build time 2022-04-26 11:35:21 -07:00