android_kernel_motorola_sm6375/drivers/block
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chun-Yi Lee 1a54aa506b aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts
[ Upstream commit f98364e926626c678fb4b9004b75cacf92ff0662 ]

This patch is against CVE-2023-6270. The description of cve is:

  A flaw was found in the ATA over Ethernet (AoE) driver in the Linux
  kernel. The aoecmd_cfg_pkts() function improperly updates the refcnt on
  `struct net_device`, and a use-after-free can be triggered by racing
  between the free on the struct and the access through the `skbtxq`
  global queue. This could lead to a denial of service condition or
  potential code execution.

In aoecmd_cfg_pkts(), it always calls dev_put(ifp) when skb initial
code is finished. But the net_device ifp will still be used in
later tx()->dev_queue_xmit() in kthread. Which means that the
dev_put(ifp) should NOT be called in the success path of skb
initial code in aoecmd_cfg_pkts(). Otherwise tx() may run into
use-after-free because the net_device is freed.

This patch removed the dev_put(ifp) in the success path in
aoecmd_cfg_pkts(), and added dev_put() after skb xmit in tx().

Link: https://nvd.nist.gov/vuln/detail/CVE-2023-6270
Fixes: 7562f876cd ("[NET]: Rework dev_base via list_head (v3)")
Signed-off-by: Chun-Yi Lee <jlee@suse.com>
Link: https://lore.kernel.org/r/20240305082048.25526-1-jlee@suse.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:22:13 -04:00
..
aoe aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts 2024-03-26 18:22:13 -04:00
drbd treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
mtip32xx
paride
rsxx
xen-blkback
zram
amiflop.c
ataflop.c
brd.c
cryptoloop.c
floppy.c
Kconfig remove the sx8 block driver 2023-11-08 11:23:42 +01:00
loop.c loop: Select I/O scheduler 'none' from inside add_disk() 2023-08-11 11:53:54 +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_zoned.c
pktcdvd.c
ps3disk.c
ps3vram.c
rbd.c rbd: don't move requests to the running list on errors 2024-02-23 08:24:52 +01:00
rbd_types.h
skd_main.c
skd_s1120.h
sunvdc.c
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