linux-stable/net/9p
Dominique Martinet cb8212026c 9p/xen: check logical size for buffer size
[ Upstream commit 391c18cf77 ]

trans_xen did not check the data fits into the buffer before copying
from the xen ring, but we probably should.
Add a check that just skips the request and return an error to
userspace if it did not fit

Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
Link: https://lkml.kernel.org/r/20221118135542.63400-1-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-14 11:40:49 +01:00
..
client.c iov_iter stuff, part 2, rebased 2022-08-08 20:04:35 -07:00
error.c 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
Kconfig 9p/trans_fd: split into dedicated module 2022-01-10 09:58:30 +09:00
Makefile 9p/trans_fd: split into dedicated module 2022-01-10 09:58:30 +09:00
mod.c net/p9: load default transports 2022-01-10 10:00:09 +09:00
protocol.c 9p: convert to advancing variant of iov_iter_get_pages_alloc() 2022-08-08 22:37:23 -04:00
protocol.h 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
trans_common.c 9p: fix file headers 2021-11-03 17:45:04 +09:00
trans_common.h 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
trans_fd.c 9p/fd: Use P9_HDRSZ for header size 2022-12-14 11:40:47 +01:00
trans_rdma.c 9p: Add client parameter to p9_req_put() 2022-07-09 14:38:35 +09:00
trans_virtio.c iov_iter stuff, part 2, rebased 2022-08-08 20:04:35 -07:00
trans_xen.c 9p/xen: check logical size for buffer size 2022-12-14 11:40:49 +01:00