BFS-fs: bfs_fill_super(): loop2 is unclean, continuing audit: type=1804 audit(1677596231.542:12): pid=11478 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir1041056206/syzkaller.nrB4Z3/121/bus" dev="sda1" ino=14086 res=1 ================================================================== BUG: KASAN: slab-out-of-bounds in find_first_zero_bit+0x84/0x90 lib/find_bit.c:105 Read of size 8 at addr ffff8880aa51ff40 by task syz-executor.2/11472 CPU: 1 PID: 11472 Comm: syz-executor.2 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:251 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:350 kasan_report mm/kasan/report.c:408 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:429 attempt to access beyond end of device find_first_zero_bit+0x84/0x90 lib/find_bit.c:105 bfs_create+0xfb/0x620 fs/bfs/dir.c:92 loop1: rw=1, want=57344, limit=40427 lookup_open+0x77a/0x1750 fs/namei.c:3241 do_last fs/namei.c:3334 [inline] path_openat+0xe08/0x2970 fs/namei.c:3571 attempt to access beyond end of device do_filp_open+0x179/0x3c0 fs/namei.c:3605 do_sys_open+0x296/0x410 fs/open.c:1081 loop1: rw=1, want=57352, limit=40427 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7efc2f30d0f9 RSP: 002b:00007efc2d87f168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007efc2f42cf80 RCX: 00007efc2f30d0f9 RDX: 000000000000275a RSI: 0000000020000040 RDI: ffffffffffffff9c RBP: 00007efc2f368ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc584738af R14: 00007efc2d87f300 R15: 0000000000022000 Allocated by task 11472: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] bfs_fill_super+0x3d5/0xd80 fs/bfs/inode.c:363 mount_bdev+0x2b3/0x360 fs/super.c:1134 mount_fs+0x92/0x2a0 fs/super.c:1237 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2572 [inline] do_mount+0xe65/0x2a30 fs/namespace.c:2905 SYSC_mount fs/namespace.c:3121 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3098 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 Freed by task 10452: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 kvm_destroy_vm_debugfs arch/x86/kvm/../../../virt/kvm/kvm_main.c:589 [inline] kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:776 [inline] kvm_put_kvm+0x182/0xab0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:819 kvm_vm_release+0x3f/0x50 arch/x86/kvm/../../../virt/kvm/kvm_main.c:830 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 The buggy address belongs to the object at ffff8880aa51ff40 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880aa51ff40, ffff8880aa51ff60) The buggy address belongs to the page: page:ffffea0002a947c0 count:1 mapcount:0 mapping:ffff8880aa51f000 index:0xffff8880aa51ffc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880aa51f000 ffff8880aa51ffc1 0000000100000033 raw: ffffea0002cd48e0 ffffea0002c21260 ffff88813fe741c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880aa51fe00: 05 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8880aa51fe80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880aa51ff00: fb fb fb fb fc fc fc fc 07 fc fc fc fc fc fc fc ^ ffff8880aa51ff80: 05 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880aa520000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== orangefs_mount: mount request failed with -4