bisecting fixing commit since f40ddce88593482919761f74910f42f4b84c004b building syzkaller on 98682e5e2aefc9aad61354f4f3ac93be96002a2a testing commit f40ddce88593482919761f74910f42f4b84c004b compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: a20fdda6284e1de4805076b3f724e927513bee772a53c4f27dc22d1ef7831f86 run #0: crashed: KASAN: use-after-free Read in blk_update_request run #1: crashed: KASAN: use-after-free Read in blk_update_request run #2: crashed: KASAN: use-after-free Read in blk_update_request run #3: crashed: KASAN: use-after-free Read in blk_update_request run #4: crashed: KASAN: use-after-free Read in blk_update_request run #5: crashed: KASAN: use-after-free Read in blk_update_request run #6: crashed: KASAN: use-after-free Read in blk_update_request run #7: crashed: KASAN: use-after-free Read in blk_update_request run #8: crashed: KASAN: use-after-free Read in blk_update_request run #9: crashed: KASAN: use-after-free Read in blk_update_request run #10: crashed: KASAN: use-after-free Read in blk_update_request run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK testing current HEAD d5ae8d7f85b7f6f6e60f1af8ff4be52b0926fde1 testing commit d5ae8d7f85b7f6f6e60f1af8ff4be52b0926fde1 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: db89d85a4cce567cfa0c427142a339e997b1dfad0e862b515551623f04a80861 run #0: crashed: KASAN: use-after-free Read in blk_update_request run #1: crashed: KASAN: use-after-free Read in blk_update_request run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK reproducer seems to be flaky Reproducer flagged being flaky revisions tested: 2, total time: 32m29.230699055s (build: 14m6.720455627s, test: 17m30.238482242s) the crash still happens on HEAD commit msg: Revert "media: dvb header files: move some headers to staging" crash: KASAN: use-after-free Read in blk_update_request ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3b8d/0x5410 kernel/locking/lockdep.c:4885 Read of size 8 at addr ffff888011c4c068 by task ksoftirqd/0/12 CPU: 0 PID: 12 Comm: ksoftirqd/0 Not tainted 5.14.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x45/0x59 lib/dump_stack.c:105 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:436 __lock_acquire+0x3b8d/0x5410 kernel/locking/lockdep.c:4885 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x4f0 kernel/locking/lockdep.c:5590 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:159 __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:137 req_bio_endio block/blk-core.c:262 [inline] blk_update_request+0x738/0x11c0 block/blk-core.c:1437 blk_mq_end_request+0x46/0x480 block/blk-mq.c:565 blk_complete_reqs+0x90/0xc0 block/blk-mq.c:577 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 run_ksoftirqd kernel/softirq.c:920 [inline] run_ksoftirqd+0x2d/0x60 kernel/softirq.c:912 smpboot_thread_fn+0x548/0x8c0 kernel/smpboot.c:164 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 17219: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0x7c/0x90 mm/kasan/common.c:522 kmalloc include/linux/slab.h:591 [inline] lbmLogInit fs/jfs/jfs_logmgr.c:1830 [inline] lmLogInit+0x300/0x12c0 fs/jfs/jfs_logmgr.c:1278 open_inline_log fs/jfs/jfs_logmgr.c:1183 [inline] lmLogOpen+0x67d/0x1010 fs/jfs/jfs_logmgr.c:1077 jfs_mount_rw+0x229/0x430 fs/jfs/jfs_mount.c:260 jfs_fill_super+0x78c/0xb10 fs/jfs/super.c:570 mount_bdev+0x2cb/0x3b0 fs/super.c:1368 legacy_get_tree+0xfa/0x1f0 fs/fs_context.c:610 vfs_get_tree+0x7f/0x2c0 fs/super.c:1498 do_new_mount fs/namespace.c:2923 [inline] path_mount+0x800/0x1a50 fs/namespace.c:3253 do_mount fs/namespace.c:3266 [inline] __do_sys_mount fs/namespace.c:3474 [inline] __se_sys_mount fs/namespace.c:3451 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3451 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 17219: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xe0/0x110 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1628 [inline] slab_free_freelist_hook+0xa1/0x180 mm/slub.c:1653 slab_free mm/slub.c:3213 [inline] kfree+0xe5/0x620 mm/slub.c:4267 lbmLogShutdown fs/jfs/jfs_logmgr.c:1873 [inline] lmLogInit+0x89a/0x12c0 fs/jfs/jfs_logmgr.c:1424 open_inline_log fs/jfs/jfs_logmgr.c:1183 [inline] lmLogOpen+0x67d/0x1010 fs/jfs/jfs_logmgr.c:1077 jfs_mount_rw+0x229/0x430 fs/jfs/jfs_mount.c:260 jfs_fill_super+0x78c/0xb10 fs/jfs/super.c:570 mount_bdev+0x2cb/0x3b0 fs/super.c:1368 legacy_get_tree+0xfa/0x1f0 fs/fs_context.c:610 vfs_get_tree+0x7f/0x2c0 fs/super.c:1498 do_new_mount fs/namespace.c:2923 [inline] path_mount+0x800/0x1a50 fs/namespace.c:3253 do_mount fs/namespace.c:3266 [inline] __do_sys_mount fs/namespace.c:3474 [inline] __se_sys_mount fs/namespace.c:3451 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3451 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xc5/0xf0 mm/kasan/generic.c:348 insert_work+0x42/0x300 kernel/workqueue.c:1332 __queue_work+0x49c/0xc70 kernel/workqueue.c:1498 queue_work_on+0x64/0x70 kernel/workqueue.c:1525 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x1b8/0x430 kernel/umh.c:435 kobject_uevent_env+0xc61/0x1290 lib/kobject_uevent.c:618 __loop_clr_fd+0x8ab/0x1380 drivers/block/loop.c:1409 loop_clr_fd drivers/block/loop.c:1496 [inline] lo_ioctl+0x38e/0x1650 drivers/block/loop.c:1852 blkdev_ioctl+0x24c/0x5f0 block/ioctl.c:585 block_ioctl+0xd4/0x130 fs/block_dev.c:1604 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl fs/ioctl.c:1055 [inline] __x64_sys_ioctl+0x11f/0x190 fs/ioctl.c:1055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xc5/0xf0 mm/kasan/generic.c:348 insert_work+0x42/0x300 kernel/workqueue.c:1332 __queue_work+0x49c/0xc70 kernel/workqueue.c:1498 queue_work_on+0x64/0x70 kernel/workqueue.c:1525 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x1b8/0x430 kernel/umh.c:435 kobject_uevent_env+0xc61/0x1290 lib/kobject_uevent.c:618 __loop_clr_fd+0x8ab/0x1380 drivers/block/loop.c:1409 blkdev_put_whole fs/block_dev.c:1279 [inline] blkdev_put+0x2cd/0x950 fs/block_dev.c:1576 blkdev_close+0x8b/0xd0 fs/block_dev.c:1586 __fput+0x209/0x870 fs/file_table.c:280 task_work_run+0xc0/0x160 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888011c4c000 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 104 bytes inside of 192-byte region [ffff888011c4c000, ffff888011c4c0c0) The buggy address belongs to the page: page:00000000c90d312a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11c4c flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff88800f041a00 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888011c4bf00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ffff888011c4bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888011c4c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888011c4c080: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888011c4c100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================