kernel_samsung_a53x/include
Chuck Lever 7cf6c7bcb6 SUNRPC: Fix svcxdr_init_decode's end-of-buffer calculation
[ Upstream commit 90bfc37b5ab91c1a6165e3e5cfc49bf04571b762 ]

Ensure that stream-based argument decoding can't go past the actual
end of the receive buffer. xdr_init_decode's calculation of the
value of xdr->end over-estimates the end of the buffer because the
Linux kernel RPC server code does not remove the size of the RPC
header from rqstp->rq_arg before calling the upper layer's
dispatcher.

The server-side still uses the svc_getnl() macros to decode the
RPC call header. These macros reduce the length of the head iov
but do not update the total length of the message in the buffer
(buf->len).

A proper fix for this would be to replace the use of svc_getnl() and
friends in the RPC header decoder, but that would be a large and
invasive change that would be difficult to backport.

Fixes: 5191955d6fc6 ("SUNRPC: Prepare for xdr_stream-style decoding on the server-side")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 14:19:31 +01:00
..
acpi
asm-generic
clocksource
crypto
drm drm/mipi-dsi: use correct return type for the DSC functions 2024-11-19 12:26:58 +01:00
dt-bindings
keys
kunit
kvm
linux SUNRPC: Fix svcxdr_init_decode's end-of-buffer calculation 2024-11-19 14:19:31 +01:00
math-emu
media
memory
misc
net Bluetooth: L2CAP: Fix rejecting L2CAP_CONN_PARAM_UPDATE_REQ 2024-11-19 14:19:03 +01:00
pcmcia
ras
rdma
scsc
scsi
sdp
soc soc: fsl: qbman: Add CGR update function 2024-11-19 09:22:35 +01:00
sound ASoC: soc-acpi: add helper to identify parent driver. 2024-11-19 12:26:57 +01:00
target
test
trace SUNRPC: Fix a NULL pointer deref in trace_svc_stats_latency() 2024-11-19 14:19:31 +01:00
uapi hugetlb_encode.h: fix undefined behaviour (34 << 26) 2024-11-19 14:19:05 +01:00
variant1/linux
vdso
video
xen