linux-stable/drivers/block
Dan Carpenter c2a00b1498 drbd: use after free in drbd_create_device()
[ Upstream commit a7a1598189 ]

The drbd_destroy_connection() frees the "connection" so use the _safe()
iterator to prevent a use after free.

Fixes: b6f85ef953 ("drbd: Iterate over all connections")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Link: https://lore.kernel.org/r/Y3Jd5iZRbNQ9w6gm@kili
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-26 09:27:37 +01:00
..
aoe block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
drbd drbd: use after free in drbd_create_device() 2022-11-26 09:27:37 +01:00
mtip32xx blk-mq: Drop 'reserved' arg of busy_tag_iter_fn 2022-07-06 06:33:53 -06:00
null_blk null_blk: fix ida error handling in null_add_dev() 2022-08-02 17:22:41 -06:00
paride block: Change the type of req_op() and bio_op() into enum req_op 2022-07-14 12:14:30 -06:00
rnbd block/rnbd-srv: Replace sess_dev_list with index_idr 2022-08-02 17:14:50 -06:00
xen-blkback xen: branch for v6.0-rc4 2022-09-03 13:23:11 -07:00
zram Revert "zram: remove double compression logic" 2022-08-20 15:17:44 -07:00
amiflop.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ataflop.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
brd.c block/brd: Use the enum req_op type 2022-07-14 12:14:31 -06:00
floppy.c block/floppy: Fix a sparse warning 2022-07-14 12:14:31 -06:00
Kconfig remove the sx8 block driver 2022-08-02 17:22:46 -06:00
loop.c loop: Check for overflow while configuring loop 2022-08-24 06:52:52 -06:00
Makefile remove the sx8 block driver 2022-08-02 17:22:46 -06:00
n64cart.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
nbd.c nbd: Fix hung when signal interrupts nbd_start_device_ioctl() 2022-10-21 12:39:21 +02:00
pktcdvd.c block: change the blk_queue_split calling convention 2022-08-02 17:22:53 -06:00
ps3disk.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ps3vram.c block: change the blk_queue_split calling convention 2022-08-02 17:22:53 -06:00
rbd.c We have a good pile of various fixes and cleanups from Xiubo, Jeff, 2022-08-11 12:41:07 -07:00
rbd_types.h libceph, rbd: replace zero-length array with flexible-array 2020-06-01 13:22:53 +02:00
sunvdc.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim3.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim_asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ublk_drv.c ublk_drv: return flag of UBLK_F_URING_CMD_COMP_IN_TASK in case of module 2022-11-10 18:17:29 +01:00
virtio_blk.c virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq() 2022-09-27 18:30:49 -04:00
xen-blkfront.c xen: branch for v6.0-rc4 2022-09-03 13:23:11 -07:00
z2ram.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00