linux/drivers/s390/cio
Qinglang Miao 857b1403c3 s390/cio: fix use-after-free in ccw_device_destroy_console
[ Upstream commit 14d4c4fa46eeaa3922e8e1c4aa727eb0a1412804 ]

Use of sch->dev reference after the put_device() call could trigger
the use-after-free bugs.

Fix this by simply adjusting the position of put_device.

Fixes: 37db8985b2 ("s390/cio: add basic protected virtualization support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
[vneethv@linux.ibm.com: Slight modification in the commit-message]
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:23 +01:00
..
Makefile
airq.c s390/irq: replace setup_irq() by request_irq() 2020-10-01 13:17:40 +02:00
blacklist.c
blacklist.h
ccwgroup.c
ccwreq.c
chp.c
chp.h
chsc.c
chsc.h
chsc_sch.c
chsc_sch.h
cio.c s390/irq: replace setup_irq() by request_irq() 2020-10-01 13:17:40 +02:00
cio.h
cio_debug.h
cmf.c
crw.c
css.c s390/cio: add cond_resched() in the slow_eval_known_fn() loop 2020-09-03 11:26:59 +02:00
css.h
device.c s390/cio: fix use-after-free in ccw_device_destroy_console 2020-12-30 11:51:23 +01:00
device.h
device_fsm.c
device_id.c
device_ops.c
device_pgid.c
device_status.c
eadm_sch.c
eadm_sch.h
fcx.c
idset.c
idset.h
io_sch.h
ioasm.c
ioasm.h
isc.c
itcw.c
orb.h
qdio.h s390/qdio: put thinint indicator after early error 2020-06-24 17:50:22 +02:00
qdio_debug.c
qdio_debug.h
qdio_main.c
qdio_setup.c s390/qdio: put thinint indicator after early error 2020-06-24 17:50:22 +02:00
qdio_thinint.c s390/qdio: put thinint indicator after early error 2020-06-24 17:50:22 +02:00
scm.c
trace.c
trace.h
vfio_ccw_async.c
vfio_ccw_cp.c
vfio_ccw_cp.h
vfio_ccw_drv.c s390/cio: generate delayed uevent for vfio-ccw subchannels 2020-04-29 16:33:01 +02:00
vfio_ccw_fsm.c
vfio_ccw_ops.c
vfio_ccw_private.h
vfio_ccw_trace.h