linux/arch/um/drivers
Gabriel Krisman Bertazi 6ba010ea48 um: ubd: Prevent buffer overrun on command completion
[ Upstream commit 6e682d53fc ]

On the hypervisor side, when completing commands and the pipe is full,
we retry writing only the entries that failed, by offsetting
io_req_buffer, but we don't reduce the number of bytes written, which
can cause a buffer overrun of io_req_buffer, and write garbage to the
pipe.

Cc: Martyn Welch <martyn.welch@collabora.com>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-23 10:36:35 +02:00
..
chan_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
chan_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
chan_user.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
chan.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
cow_sys.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cow_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
cow.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
daemon_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
daemon_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
daemon.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
fd.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
harddog_kern.c *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
harddog_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
hostaudio_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
Kconfig um: virtio_uml: Disallow modular build 2020-01-23 08:22:57 +01:00
line.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
line.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
Makefile um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
mconsole_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
mconsole_kern.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
mconsole_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
mconsole.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
mmapper_kern.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
net_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
net_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
null.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
pcap_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
pcap_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
pcap_user.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
port_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
port_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
port.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
pty.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
random.c um: Remove obsolete reenable_XX calls 2018-12-27 22:48:35 +01:00
slip_common.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
slip_common.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
slip_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
slip_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
slip.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
slirp_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
slirp_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
slirp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ssl.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
stderr_console.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stdio_console.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
stdio_console.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
tty.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
ubd_kern.c um: ubd: Prevent buffer overrun on command completion 2020-04-23 10:36:35 +02:00
ubd_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
ubd.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
umcast_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
umcast_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
umcast.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vde_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vde_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vde.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vector_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vector_kern.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vector_transports.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vector_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vector_user.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vhost_user.h um: virtio: Implement VHOST_USER_PROTOCOL_F_REPLY_ACK 2019-09-15 21:37:16 +02:00
virtio_uml.c um: virtio_uml: Disallow modular build 2020-01-23 08:22:57 +01:00
xterm_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
xterm.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
xterm.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00