================================================================== BUG: KASAN: use-after-free in atomic64_read include/asm-generic/atomic-instrumented.h:27 [inline] BUG: KASAN: use-after-free in atomic_long_read include/asm-generic/atomic-long.h:47 [inline] BUG: KASAN: use-after-free in __mutex_unlock_slowpath+0x96/0x670 kernel/locking/mutex.c:1206 Read of size 8 at addr ffff8880993e2298 by task syz-executor.3/18135 CPU: 1 PID: 18135 Comm: syz-executor.3 Not tainted 4.19.107-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.cold+0x7c/0x212 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396 atomic64_read include/asm-generic/atomic-instrumented.h:27 [inline] atomic_long_read include/asm-generic/atomic-long.h:47 [inline] __mutex_unlock_slowpath+0x96/0x670 kernel/locking/mutex.c:1206 blkdev_get+0x561/0x910 fs/block_dev.c:1671 blkdev_get_by_dev+0x3b/0x70 fs/block_dev.c:1750 lock_rdev+0x93/0x150 drivers/md/md.c:2307 md_import_device+0x1fc/0x4a0 drivers/md/md.c:3488 add_new_disk+0x549/0x17a0 drivers/md/md.c:6347 md_ioctl+0x3fcb/0x5210 drivers/md/md.c:7365 __blkdev_driver_ioctl block/ioctl.c:303 [inline] blkdev_ioctl+0xbf7/0x1a1c block/ioctl.c:601 block_ioctl+0xe9/0x130 fs/block_dev.c:1894 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcda/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c479 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f1b66b15c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f1b66b166d4 RCX: 000000000045c479 RDX: 0000000020001200 RSI: 0000000040140921 RDI: 0000000000000009 RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000021e R14: 00000000004c4045 R15: 000000000076bf2c Allocated by task 18135: set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:531 kmem_cache_alloc+0x127/0x710 mm/slab.c:3559 bdev_alloc_inode+0x18/0x40 fs/block_dev.c:744 alloc_inode+0x5d/0x180 fs/inode.c:210 iget5_locked fs/inode.c:1130 [inline] iget5_locked+0x57/0xd0 fs/inode.c:1123 bdget+0x96/0x510 fs/block_dev.c:885 blkdev_get_by_dev+0x21/0x70 fs/block_dev.c:1746 lock_rdev+0x93/0x150 drivers/md/md.c:2307 md_import_device+0x1fc/0x4a0 drivers/md/md.c:3488 add_new_disk+0x549/0x17a0 drivers/md/md.c:6347 md_ioctl+0x3fcb/0x5210 drivers/md/md.c:7365 __blkdev_driver_ioctl block/ioctl.c:303 [inline] blkdev_ioctl+0xbf7/0x1a1c block/ioctl.c:601 block_ioctl+0xe9/0x130 fs/block_dev.c:1894 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcda/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 18132: set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/kasan.c:521 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x7f/0x260 mm/slab.c:3765 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0xb2d/0x17f0 kernel/rcu/tree.c:2881 __do_softirq+0x26c/0x93c kernel/softirq.c:292 The buggy address belongs to the object at ffff8880993e2280 which belongs to the cache bdev_cache(65:syz3) of size 1344 The buggy address is located 24 bytes inside of 1344-byte region [ffff8880993e2280, ffff8880993e27c0) The buggy address belongs to the page: page:ffffea000264f880 count:1 mapcount:0 mapping:ffff888086ac1380 index:0xffff8880993e2ffe flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea00010649c8 ffffea000102e408 ffff888086ac1380 raw: ffff8880993e2ffe ffff8880993e2280 0000000100000002 ffff88804c146780 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88804c146780 Memory state around the buggy address: ffff8880993e2180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880993e2200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880993e2280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880993e2300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880993e2380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================