kernel_samsung_a53x/drivers/block
Chun-Yi Lee f90b29e234 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-23 23:21:45 +01:00
..
aoe aoe: fix the potential use-after-free problem in more places 2024-11-23 23:21:45 +01:00
drbd drbd: Add NULL check for net_conf to prevent dereference in state validation 2024-11-23 23:21:31 +01:00
mtip32xx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
null_blk null_blk: fix validation of block size 2024-11-19 14:19:47 +01:00
paride Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rnbd block/rnbd-srv: Check for unlikely string overflow 2024-11-18 12:13:13 +01:00
rsxx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-blkback Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zram block: zram_drv: Allow creation of only one ZRAM device 2024-11-19 18:06:30 +01:00
amiflop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ataflop.c block: ataflop: more blk-mq refactoring fixes 2024-11-18 22:25:42 +01:00
brd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cryptoloop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
floppy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
loop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
loop.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nbd.c nbd: null check for nla_nest_start 2024-11-19 08:44:37 +01:00
pktcdvd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ps3disk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ps3vram.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rbd.c rbd: don't assume RBD_LOCK_STATE_LOCKED for exclusive mappings 2024-11-23 23:20:16 +01:00
rbd_types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
skd_main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
skd_s1120.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunvdc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
swim.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
swim3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
swim_asm.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
umem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
umem.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio_blk.c virtio-blk: Ensure no requests in virtqueues before deleting vqs. 2024-11-18 22:25:34 +01:00
xen-blkfront.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xsysace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
z2ram.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00