linux/include
Kal Conley d769ccaf95 xsk: Fix unaligned descriptor validation
Make sure unaligned descriptors that straddle the end of the UMEM are
considered invalid. Currently, descriptor validation is broken for
zero-copy mode which only checks descriptors at page granularity.
For example, descriptors in zero-copy mode that overrun the end of the
UMEM but not a page boundary are (incorrectly) considered valid. The
UMEM boundary check needs to happen before the page boundary and
contiguity checks in xp_desc_crosses_non_contig_pg(). Do this check in
xp_unaligned_validate_desc() instead like xp_check_unaligned() already
does.

Fixes: 2b43470add ("xsk: Introduce AF_XDP buffer allocation API")
Signed-off-by: Kal Conley <kal.conley@dectris.com>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20230405235920.7305-2-kal.conley@dectris.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
2023-04-06 09:53:05 -07:00
..
acpi
asm-generic
clocksource
crypto
drm
dt-bindings ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
keys
kunit
kvm
linux kallsyms: move module-related functions under correct configs 2023-04-05 21:31:11 -07:00
math-emu
media media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
memory
misc
net xsk: Fix unaligned descriptor validation 2023-04-06 09:53:05 -07:00
pcmcia
ras
rdma
rv
scsi
soc
sound
target
trace ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
uapi bpf: Update the struct_ops of a bpf_link. 2023-03-22 22:53:02 -07:00
ufs
vdso
video
xen