android_kernel_motorola_sm6375/drivers/block
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chun-Yi Lee a786265aec aoe: fix the potential use-after-free problem in more places
commit 6d6e54fc71ad1ab0a87047fd9c211e75d86084a3 upstream.

For fixing CVE-2023-6270, f98364e92662 ("aoe: fix the potential
use-after-free problem in aoecmd_cfg_pkts") makes tx() calling dev_put()
instead of doing in aoecmd_cfg_pkts(). It avoids that the tx() runs
into use-after-free.

Then Nicolai Stange found more places in aoe have potential use-after-free
problem with tx(). e.g. revalidate(), aoecmd_ata_rw(), resend(), probe()
and aoecmd_cfg_rsp(). Those functions also use aoenet_xmit() to push
packet to tx queue. So they should also use dev_hold() to increase the
refcnt of skb->dev.

On the other hand, moving dev_put() to tx() causes that the refcnt of
skb->dev be reduced to a negative value, because corresponding
dev_hold() are not called in revalidate(), aoecmd_ata_rw(), resend(),
probe(), and aoecmd_cfg_rsp(). This patch fixed this issue.

Cc: stable@vger.kernel.org
Link: https://nvd.nist.gov/vuln/detail/CVE-2023-6270
Fixes: f98364e92662 ("aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts")
Reported-by: Nicolai Stange <nstange@suse.com>
Signed-off-by: Chun-Yi Lee <jlee@suse.com>
Link: https://lore.kernel.org/stable/20240624064418.27043-1-jlee%40suse.com
Link: https://lore.kernel.org/r/20241002035458.24401-1-jlee@suse.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-08 16:20:41 +01:00
..
aoe aoe: fix the potential use-after-free problem in more places 2024-11-08 16:20:41 +01:00
drbd drbd: Add NULL check for net_conf to prevent dereference in state validation 2024-11-08 16:20:33 +01:00
mtip32xx
paride
rsxx block: rsxx: fix error return code of rsxx_pci_probe() 2021-03-17 17:03:56 +01:00
xen-blkback xen-blkback: fix compatibility bug with single page rings 2021-05-14 09:44:23 +02:00
zram zram: off by one in read_block_state() 2021-11-17 09:48:47 +01:00
amiflop.c
ataflop.c block: ataflop: fix breakage introduced at blk-mq refactoring 2021-11-17 09:48:38 +01:00
brd.c
cryptoloop.c cryptoloop: add a deprecation warning 2021-09-12 08:56:40 +02:00
floppy.c floppy: use a statically allocated error counter 2022-05-25 09:14:31 +02:00
Kconfig remove the sx8 block driver 2023-11-08 11:23:42 +01:00
loop.c loop: loop_set_status_from_info() check before assignment 2024-04-13 12:51:30 +02:00
loop.h
Makefile remove the sx8 block driver 2023-11-08 11:23:42 +01:00
nbd.c nbd: null check for nla_nest_start 2024-03-26 18:22:13 -04:00
null_blk.h
null_blk_main.c null_blk: Fix the WARNING: modpost: missing MODULE_DESCRIPTION() 2024-06-16 13:28:45 +02:00
null_blk_zoned.c drivers/block/null_blk/main: Fix a double free in null_init. 2021-05-14 09:44:26 +02:00
pktcdvd.c
ps3disk.c
ps3vram.c
rbd.c rbd: don't assume RBD_LOCK_STATE_LOCKED for exclusive mappings 2024-08-19 05:33:40 +02:00
rbd_types.h
skd_main.c
skd_s1120.h
sunvdc.c block: sunvdc: add check for mdesc_grab() returning NULL 2023-03-22 13:28:06 +01:00
swim.c
swim3.c
swim_asm.S
umem.c
umem.h
virtio_blk.c virtio-blk: Ensure no requests in virtqueues before deleting vqs. 2024-03-01 13:13:34 +01:00
xen-blkfront.c xen/blkfront: Only check REQ_FUA for writes 2023-06-21 15:44:09 +02:00
xsysace.c
z2ram.c