linux/drivers/s390/cio
Bui Quang Minh da7c622cdd s390/cio: Ensure the copied buf is NUL terminated
Currently, we allocate a lbuf-sized kernel buffer and copy lbuf from
userspace to that buffer. Later, we use scanf on this buffer but we don't
ensure that the string is terminated inside the buffer, this can lead to
OOB read when using scanf. Fix this issue by using memdup_user_nul instead.

Fixes: a4f17cc726 ("s390/cio: add CRW inject functionality")
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20240424-fix-oob-read-v2-5-f1f1b53a10f4@gmail.com
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 19:21:34 +02:00
..
airq.c s390/airq: remove lsi_mask from airq_struct 2023-08-30 11:03:28 +02:00
blacklist.c s390/cio: avoid excessive path-verification requests 2021-09-27 13:54:38 +02:00
blacklist.h
ccwgroup.c s390/cio: use while (i--) pattern to clean up 2024-03-17 19:08:49 +01:00
ccwreq.c
chp.c s390/cio: export CMG value as decimal 2023-10-25 15:08:29 +02:00
chp.h
chsc_sch.c s390/cio: remove unneeded DMA zone allocation 2024-02-09 13:58:15 +01:00
chsc_sch.h
chsc.c s390/cio: use while (i--) pattern to clean up 2024-03-17 19:08:49 +01:00
chsc.h s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
cio_debug.h s390/cio: introduce CIO debugfs directory 2021-03-22 11:36:04 +01:00
cio_debugfs.c s390/cio: introduce CIO debugfs directory 2021-03-22 11:36:04 +01:00
cio_inject.c s390/cio: Ensure the copied buf is NUL terminated 2024-04-29 19:21:34 +02:00
cio_inject.h s390/cio: add CRW inject functionality 2021-03-22 11:36:04 +01:00
cio.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
cio.h s390/cio: make sch->lock spinlock pointer a member 2023-12-12 14:41:58 +01:00
cmf.c s390/cmf: fix virtual vs physical address confusion 2024-02-09 13:58:15 +01:00
crw.c s390: use control register bit defines 2023-09-19 13:26:57 +02:00
css.c s390/virtio_ccw: use DMA handle from DMA API 2024-03-13 09:23:46 +01:00
css.h s390/cio: evaluate devices with non-operational paths 2023-01-22 18:42:34 +01:00
device_fsm.c s390/cio: log fake IRB events 2024-04-12 16:13:03 +02:00
device_id.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
device_ops.c s390/cio: log fake IRB events 2024-04-12 16:13:03 +02:00
device_pgid.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
device_status.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
device.c s390/cio: fix race condition during online processing 2024-04-12 16:13:02 +02:00
device.h s390/cio: remove pm support from ccw bus driver 2020-12-02 18:19:25 +01:00
eadm_sch.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
eadm_sch.h
fcx.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
idset.c
idset.h
io_sch.h s390/cio: remove pm support from ccw bus driver 2020-12-02 18:19:25 +01:00
ioasm.c s390/extable: move EX_TABLE define to asm-extable.h 2022-03-08 00:33:00 +01:00
ioasm.h
isc.c s390/ctlreg: add local and system prefix to some functions 2023-09-19 13:26:56 +02:00
itcw.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
Makefile s390/cio: add CRW inject functionality 2021-03-22 11:36:04 +01:00
orb.h s390/cio: use bitwise types to allow for type checking 2024-03-13 09:23:46 +01:00
qdio_debug.c s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
qdio_debug.h
qdio_main.c s390/qdio: handle deferred cc1 2024-04-12 16:13:02 +02:00
qdio_setup.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
qdio_thinint.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
qdio.h s390/qdio: fix do_sqbs() inline assembly constraint 2023-05-17 15:20:17 +02:00
scm.c s390/cio: make scm_bus_type const 2024-02-09 13:58:16 +01:00
trace.c
trace.h s390: use struct tpi_info in lowcore.h 2021-06-07 17:07:01 +02:00
vfio_ccw_async.c vfio/ccw: Remove private->mdev 2022-07-07 14:06:12 -06:00
vfio_ccw_chp.c eventfd: simplify eventfd_signal() 2023-11-28 14:08:38 +01:00
vfio_ccw_cp.c s390/vfio_ccw_cp: use new address translation helpers 2024-03-13 09:23:49 +01:00
vfio_ccw_cp.h vfio/ccw: simplify the cp_get_orb interface 2023-01-09 14:34:07 +01:00
vfio_ccw_drv.c s390 updates for 6.8 merge window 2024-01-10 18:18:20 -08:00
vfio_ccw_fsm.c s390/vfio_ccw: fix virtual vs physical address confusion 2024-03-13 09:23:45 +01:00
vfio_ccw_ops.c eventfd: simplify eventfd_signal() 2023-11-28 14:08:38 +01:00
vfio_ccw_private.h vfio/ccw: replace one-element array with flexible-array member 2023-06-01 17:07:55 +02:00
vfio_ccw_trace.c
vfio_ccw_trace.h