bisecting fixing commit since f5b7769eb0400ec5217a47e41148a9f816ca1f9f building syzkaller on 27c5f59f504f562333e3cd5e715fea5cb69c396e testing commit f5b7769eb0400ec5217a47e41148a9f816ca1f9f with gcc (GCC) 8.1.0 kernel signature: fb9893407d1bd5820917433667f00c3d1fd2cdc43dccde9ee583bfd9f33f707e all runs: crashed: KASAN: use-after-free Read in blkdev_get testing current HEAD 4544db3f848f1d5d0f48d39c22c9636aecf73cf6 testing commit 4544db3f848f1d5d0f48d39c22c9636aecf73cf6 with gcc (GCC) 8.1.0 kernel signature: 1e72fe9cc346398ed6fef6dca2dc2cd6b96c138f0a8d49b1ba9e9692163dc03f all runs: crashed: KASAN: use-after-free Read in blkdev_get revisions tested: 2, total time: 23m56.848445361s (build: 9m38.376373639s, test: 13m35.644435688s) the crash still happens on HEAD commit msg: Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux crash: KASAN: use-after-free Read in blkdev_get reiserfs: using flush barriers REISERFS warning (device loop0): sh-458 journal_init_dev: cannot init journal device unknown-block(8,8): -6 REISERFS warning (device loop0): sh-462 journal_init: unable to initialize journal device ================================================================== BUG: KASAN: use-after-free in __mutex_lock_common kernel/locking/mutex.c:938 [inline] BUG: KASAN: use-after-free in __mutex_lock+0x10cc/0x1400 kernel/locking/mutex.c:1103 Read of size 8 at addr ffff8881b0c01138 by task syz-executor1/25421 CPU: 1 PID: 25421 Comm: syz-executor1 Not tainted 5.7.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x12f/0x187 lib/dump_stack.c:118 print_address_description.constprop.8+0x3b/0x60 mm/kasan/report.c:382 REISERFS (device loop5): found reiserfs format "3.5" with non-standard journal __kasan_report.cold.11+0x37/0x4e mm/kasan/report.c:511 kasan_report+0x38/0x50 mm/kasan/common.c:625 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:146 __mutex_lock_common kernel/locking/mutex.c:938 [inline] __mutex_lock+0x10cc/0x1400 kernel/locking/mutex.c:1103 REISERFS (device loop3): found reiserfs format "3.5" with non-standard journal REISERFS (device loop3): using ordered data mode mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1118 blkdev_get+0xb2/0x230 fs/block_dev.c:1755 blkdev_get_by_dev+0x31/0x50 fs/block_dev.c:1852 reiserfs: using flush barriers journal_init_dev fs/reiserfs/journal.c:2616 [inline] journal_init+0xa0c/0x66d0 fs/reiserfs/journal.c:2763 REISERFS (device loop5): using ordered data mode reiserfs: using flush barriers reiserfs_fill_super+0x99b/0x2800 fs/reiserfs/super.c:2032 mount_bdev+0x27b/0x340 fs/super.c:1417 get_super_block+0x10/0x20 fs/reiserfs/super.c:2606 legacy_get_tree+0x103/0x1f0 fs/fs_context.c:622 vfs_get_tree+0x8b/0x2d0 fs/super.c:1547 do_new_mount fs/namespace.c:2816 [inline] do_mount+0x1287/0x1c30 fs/namespace.c:3141 __do_sys_mount fs/namespace.c:3350 [inline] __se_sys_mount fs/namespace.c:3327 [inline] __x64_sys_mount+0x169/0x1c0 fs/namespace.c:3327 do_syscall_64+0xd0/0x630 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x4586aa Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 dd 8f fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 ba 8f fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f418641ca88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000228 RCX: 00000000004586aa RDX: 00007f418641cad0 RSI: 0000000020000100 RDI: 00007f418641caf0 RBP: 0000000000000001 R08: 00007f418641cb30 R09: 00007f418641cad0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 0000000000000001 R14: 00000000004d2f98 R15: 0000000000000000 Allocated by task 25421: save_stack+0x21/0x50 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc.constprop.7+0xc1/0xd0 mm/kasan/common.c:495 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:503 slab_post_alloc_hook mm/slab.h:586 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x121/0x740 mm/slab.c:3484 bdev_alloc_inode+0x15/0x30 fs/block_dev.c:773 alloc_inode+0x5f/0x1a0 fs/inode.c:232 iget5_locked+0x103/0x190 fs/inode.c:1148 bdget+0x90/0x4e0 fs/block_dev.c:906 blkdev_get_by_dev+0x1b/0x50 fs/block_dev.c:1848 journal_init_dev fs/reiserfs/journal.c:2616 [inline] journal_init+0xa0c/0x66d0 fs/reiserfs/journal.c:2763 reiserfs_fill_super+0x99b/0x2800 fs/reiserfs/super.c:2032 mount_bdev+0x27b/0x340 fs/super.c:1417 get_super_block+0x10/0x20 fs/reiserfs/super.c:2606 legacy_get_tree+0x103/0x1f0 fs/fs_context.c:622 vfs_get_tree+0x8b/0x2d0 fs/super.c:1547 do_new_mount fs/namespace.c:2816 [inline] do_mount+0x1287/0x1c30 fs/namespace.c:3141 __do_sys_mount fs/namespace.c:3350 [inline] __se_sys_mount fs/namespace.c:3327 [inline] __x64_sys_mount+0x169/0x1c0 fs/namespace.c:3327 do_syscall_64+0xd0/0x630 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 16: save_stack+0x21/0x50 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/common.c:456 kasan_slab_free+0xe/0x10 mm/kasan/common.c:465 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x86/0x2e0 mm/slab.c:3694 bdev_free_inode+0x17/0x20 fs/block_dev.c:781 i_callback+0x3f/0x70 fs/inode.c:221 rcu_do_batch kernel/rcu/tree.c:2206 [inline] rcu_core+0x59e/0x13b0 kernel/rcu/tree.c:2433 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2442 __do_softirq+0x248/0x9a6 kernel/softirq.c:292 The buggy address belongs to the object at ffff8881b0c010c0 which belongs to the cache bdev_cache of size 1448 The buggy address is located 120 bytes inside of 1448-byte region [ffff8881b0c010c0, ffff8881b0c01668) The buggy address belongs to the page: page:ffffea0006c30040 refcount:1 mapcount:0 mapping:0000000095a3f9cc index:0xffff8881b0c01ffe flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea0006c306c8 ffffea0006c30388 ffff8881da1abc40 raw: ffff8881b0c01ffe ffff8881b0c010c0 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881b0c01000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881b0c01080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8881b0c01100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881b0c01180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881b0c01200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================