linux-stable/include
Kal Conley 0b0e450f45 xsk: Fix unaligned descriptor validation
[ Upstream commit d769ccaf95 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:11:12 +09:00
..
acpi Revert "ACPICA: Events: Support fixed PCIe wake event" 2023-04-26 14:30:01 +02:00
asm-generic asm-generic/io.h: suppress endianness warnings for relaxed accessors 2023-05-11 23:10:48 +09:00
clocksource
crypto
drm accel: Link to compute accelerator subsystem intro 2023-05-11 23:11:00 +09:00
dt-bindings remoteproc updates for v6.2 2022-12-21 09:37:14 -08:00
keys
kunit kunit: fix kunit_test_init_section_suites(...) 2023-01-31 09:10:38 -07:00
kvm KVM: arm64: Add helper vgic_write_guest_lock() 2023-01-29 18:46:11 +00:00
linux bpf: Add basic bpf_rb_{root,node} support 2023-05-11 23:11:11 +09:00
math-emu
media media: uvcvideo: Add GUID for BGRA/X 8:8:8:8 2023-03-11 13:50:41 +01:00
memory memory: renesas-rpc-if: Split-off private data from struct rpcif 2023-03-11 13:50:21 +01:00
misc
net xsk: Fix unaligned descriptor validation 2023-05-11 23:11:12 +09:00
pcmcia
ras
rdma
rv
scsi scsi: core: Add BLIST_NO_VPD_SIZE for some VDASD 2023-03-22 13:37:44 +01:00
soc firmware: raspberrypi: Fix type assignment 2023-01-10 13:44:04 -08:00
sound ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared 2023-03-10 09:28:40 +01:00
target scsi: target: Fix multiple LUN_RESET handling 2023-05-11 23:11:10 +09:00
trace net: qrtr: correct types of trace event parameters 2023-05-11 23:11:12 +09:00
uapi bpf: Add basic bpf_rb_{root,node} support 2023-05-11 23:11:11 +09:00
ufs scsi: ufs: exynos: Fix DMA alignment for PAGE_SIZE != 4096 2023-03-10 09:28:31 +01:00
vdso
video fbdev: omapfb: connector-analog-tv: remove support for platform data 2022-12-14 20:01:49 +01:00
xen ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 2023-05-11 23:11:01 +09:00