9p/xen: check logical size for buffer size
Dominique Martinet authored
[ Upstream commit 391c18cf

 ]

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: default avatarStefano Stabellini <sstabellini@kernel.org>
Reviewed-by: default avatarChristian Schoenebeck <linux_oss@crudebyte.com>
Link: https://lkml.kernel.org/r/20221118135542.63400-1-asmadeus@codewreck.org

Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
e82c0b18
Name Last commit Last update
Documentation docs: update mediator contact information in CoC doc
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text
arch ARM: dts: rockchip: disable arm_global_timer on rk3066 and rk3188
block block: sed-opal: kmalloc the cmd/resp buffers
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous
drivers fbcon: Use kzalloc() in fbcon_prepare_logo()
firmware Fix built-in early-load Intel microcode alignment
fs nilfs2: fix NULL pointer dereference in nilfs_palloc_commit_free_entry()
include mm: Fix '.data.once' orphan section warning
init random: handle latent entropy and command line from random_init()
ipc ipc/sem: Fix dangling sem_array access in semtimedop race
kernel proc: proc_skip_spaces() shouldn't think it is working on C strings
lib Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled
mm v4l2: don't fall back to follow_pfn() if pin_user_pages_fast() fails
net 9p/xen: check logical size for buffer size
samples samples/kretprobes: Fix return value if register_kretprobe() failed
scripts scripts/faddr2line: Fix regression in name resolution on ppc64le
security capabilities: fix potential memleak on error path from vfs_getxattr_alloc()
sound ASoC: soc-pcm: Add NULL check in BE reparenting
tools tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep"
usr initramfs: restore default compression behavior
virt KVM: arm64: vgic: Fix exit condition in scan_its_table()
.clang-format clang-format: Set IndentWrappedFunctionNames false
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.