FAT-fs (loop2): bogus number of reserved sectors ================================================================== FAT-fs (loop2): Can't find a valid FAT filesystem BUG: KASAN: use-after-free in trace_event_get_offsets_lock include/trace/events/lock.h:39 [inline] BUG: KASAN: use-after-free in perf_trace_lock+0x3a6/0x4b0 include/trace/events/lock.h:39 Read of size 8 at addr ffff8880a6d871d0 by task syz-executor.4/3361 CPU: 0 PID: 3361 Comm: syz-executor.4 Not tainted 4.14.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2b9 mm/kasan/report.c:393 trace_event_get_offsets_lock include/trace/events/lock.h:39 [inline] perf_trace_lock+0x3a6/0x4b0 include/trace/events/lock.h:39 trace_lock_release include/trace/events/lock.h:58 [inline] lock_release+0x4df/0x7f0 kernel/locking/lockdep.c:4016 __mutex_unlock_slowpath+0x75/0x780 kernel/locking/mutex.c:1018 blkdev_get+0x537/0x8a0 fs/block_dev.c:1655 blkdev_get_by_dev+0x3b/0x70 fs/block_dev.c:1734 lock_rdev+0x79/0x110 drivers/md/md.c:2293 md_import_device+0x1b1/0x430 drivers/md/md.c:3466 add_new_disk+0x4a8/0x1510 drivers/md/md.c:6320 md_ioctl+0x36b4/0x4920 drivers/md/md.c:7338 __blkdev_driver_ioctl block/ioctl.c:297 [inline] blkdev_ioctl+0x91d/0x17c0 block/ioctl.c:594 block_ioctl+0xd9/0x120 fs/block_dev.c:1881 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xfe0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ca59 RSP: 002b:00007f308d5cac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000004e1be0 RCX: 000000000045ca59 RDX: 0000000020001200 RSI: 0000000040140921 RDI: 0000000000000004 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000225 R14: 00000000004c46f3 R15: 00007f308d5cb6d4 Allocated by task 3361: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551 kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552 bdev_alloc_inode+0x18/0x40 fs/block_dev.c:754 alloc_inode+0x5d/0x170 fs/inode.c:210 iget5_locked+0x16c/0x450 fs/inode.c:1050 bdget+0x83/0x4c0 fs/block_dev.c:895 blkdev_get_by_dev+0x21/0x70 fs/block_dev.c:1730 lock_rdev+0x79/0x110 drivers/md/md.c:2293 md_import_device+0x1b1/0x430 drivers/md/md.c:3466 add_new_disk+0x4a8/0x1510 drivers/md/md.c:6320 md_ioctl+0x36b4/0x4920 drivers/md/md.c:7338 __blkdev_driver_ioctl block/ioctl.c:297 [inline] blkdev_ioctl+0x91d/0x17c0 block/ioctl.c:594 block_ioctl+0xd9/0x120 fs/block_dev.c:1881 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xfe0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 6333: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xaf/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x78d/0x1180 kernel/rcu/tree.c:2946 __do_softirq+0x254/0x9bf kernel/softirq.c:288 The buggy address belongs to the object at ffff8880a6d87140 which belongs to the cache bdev_cache of size 1360 The buggy address is located 144 bytes inside of 1360-byte region [ffff8880a6d87140, ffff8880a6d87690) The buggy address belongs to the page: page:ffffea00029b61c0 count:1 mapcount:0 mapping:ffff8880a6d87140 index:0xffff8880a6d87ffe flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880a6d87140 ffff8880a6d87ffe 0000000100000002 raw: ffffea000212e320 ffff8880aa9db348 ffff8880aa9da840 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a6d87080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a6d87100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880a6d87180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a6d87200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a6d87280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================