sg_write: data in/out 124/1 bytes for SCSI command 0x1c-- guessing data in; program syz.5.9019 not setting count and/or reply_len properly ================================================================== BUG: KASAN: global-out-of-bounds in kernfs_root+0x29a/0x2a0 fs/kernfs/kernfs-internal.h:76 Read of size 8 at addr ffffffff9ab92750 by task syz.5.9019/32034 CPU: 3 UID: 0 PID: 32034 Comm: syz.5.9019 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 kernfs_root+0x29a/0x2a0 fs/kernfs/kernfs-internal.h:76 kernfs_remove_by_name_ns+0x2e/0x100 fs/kernfs/dir.c:1711 sysfs_remove_file include/linux/sysfs.h:770 [inline] driver_remove_file drivers/base/driver.c:201 [inline] driver_remove_file+0x4a/0x60 drivers/base/driver.c:197 remove_bind_files drivers/base/bus.c:605 [inline] bus_remove_driver+0x224/0x2c0 drivers/base/bus.c:743 driver_unregister+0x76/0xb0 drivers/base/driver.c:277 comedi_device_detach_locked+0x12f/0xa50 drivers/comedi/drivers.c:207 do_devconfig_ioctl+0x555/0x710 drivers/comedi/comedi_fops.c:848 comedi_unlocked_ioctl+0x165d/0x2ee0 drivers/comedi/comedi_fops.c:2178 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f907758f7c9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f90783d6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f90777e5fa0 RCX: 00007f907758f7c9 RDX: 0000000000000000 RSI: 0000000040946400 RDI: 0000000000000004 RBP: 00007f9077613f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f90777e6038 R14: 00007f90777e5fa0 R15: 00007ffe6b7ece78 The buggy address belongs to the variable: __key.1+0x30/0x40 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1ab92 flags: 0xfff00000002000(reserved|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002000 ffffea00006ae488 ffffea00006ae488 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffffffff9ab92600: f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 ffffffff9ab92680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9 >ffffffff9ab92700: f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 ^ ffffffff9ab92780: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00 ffffffff9ab92800: 00 00 00 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 ==================================================================