kernel_optimize_test/drivers/block
Willy Tarreau 54c028cfc4 floppy: disable FDRAWCMD by default
commit 233087ca063686964a53c829d547c7571e3f67bf upstream.

Minh Yuan reported a concurrency use-after-free issue in the floppy code
between raw_cmd_ioctl and seek_interrupt.

[ It turns out this has been around, and that others have reported the
  KASAN splats over the years, but Minh Yuan had a reproducer for it and
  so gets primary credit for reporting it for this fix   - Linus ]

The problem is, this driver tends to break very easily and nowadays,
nobody is expected to use FDRAWCMD anyway since it was used to
manipulate non-standard formats.  The risk of breaking the driver is
higher than the risk presented by this race, and accessing the device
requires privileges anyway.

Let's just add a config option to completely disable this ioctl and
leave it disabled by default.  Distros shouldn't use it, and only those
running on antique hardware might need to enable it.

Link: https://lore.kernel.org/all/000000000000b71cdd05d703f6bf@google.com/
Link: https://lore.kernel.org/lkml/CAKcFiNC=MfYVW-Jt9A3=FPJpTwCD2PL_ULNCpsCVE5s8ZeBQgQ@mail.gmail.com
Link: https://lore.kernel.org/all/CAEAjamu1FRhz6StCe_55XY5s389ZP_xmCF69k987En+1z53=eg@mail.gmail.com
Reported-by: Minh Yuan <yuanmingbuaa@gmail.com>
Reported-by: syzbot+8e8958586909d62b6840@syzkaller.appspotmail.com
Reported-by: cruise k <cruise4k@gmail.com>
Reported-by: Kyungtae Kim <kt0755@gmail.com>
Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org>
Tested-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-09 09:04:56 +02:00
..
aoe
drbd drbd: Fix five use after free bugs in get_initial_state 2022-04-13 21:01:06 +02:00
mtip32xx
paride
rnbd
rsxx
xen-blkback
zram zram: off by one in read_block_state() 2021-11-18 14:04:27 +01:00
amiflop.c
ataflop.c
brd.c
cryptoloop.c cryptoloop: add a deprecation warning 2021-09-08 08:49:01 +02:00
floppy.c floppy: disable FDRAWCMD by default 2022-05-09 09:04:56 +02:00
Kconfig floppy: disable FDRAWCMD by default 2022-05-09 09:04:56 +02:00
loop.c loop: use sysfs_emit() in the sysfs xxx show() 2022-04-08 14:40:31 +02:00
loop.h
Makefile
nbd.c Revert "block: nbd: add sanity check for first_minor" 2021-09-16 12:51:23 +02:00
null_blk_main.c
null_blk_trace.c
null_blk_trace.h
null_blk_zoned.c
null_blk.h
pktcdvd.c
ps3disk.c
ps3vram.c
rbd_types.h
rbd.c rbd: always kick acquire on "acquired" and "released" notifications 2021-07-28 14:35:46 +02:00
skd_main.c
skd_s1120.h
sunvdc.c
swim_asm.S
swim.c
swim3.c
sx8.c
umem.c
umem.h
virtio_blk.c virtio-blk: Use blk_validate_block_size() to validate block size 2022-04-08 14:39:48 +02:00
xen-blkfront.c xen/blkfront: don't use gnttab_query_foreign_access() for mapped status 2022-03-11 12:11:54 +01:00
xsysace.c
z2ram.c