kasan: GPF could be caused by NULL-ptr deref or user memory access BFS-fs: bfs_fill_super(): loop4 is unclean, continuing ================================================================== general protection fault: 0000 [#1] PREEMPT SMP KASAN BUG: KASAN: slab-out-of-bounds in find_first_zero_bit+0x84/0x90 lib/find_bit.c:105 Modules linked in: Read of size 8 at addr ffff8880a230d340 by task syz-executor.4/9693 CPU: 1 PID: 9703 Comm: syz-executor.2 Not tainted 4.14.307-syzkaller #0 CPU: 0 PID: 9693 Comm: syz-executor.4 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 task: ffff8880a053c040 task.stack: ffff888041ea0000 Call Trace: RIP: 0010:vhost_umem_interval_tree_iter_first drivers/vhost/vhost.c:53 [inline] RIP: 0010:vhost_del_umem_range drivers/vhost/vhost.c:977 [inline] RIP: 0010:vhost_process_iotlb_msg drivers/vhost/vhost.c:1048 [inline] RIP: 0010:vhost_chr_write_iter drivers/vhost/vhost.c:1077 [inline] RIP: 0010:vhost_chr_write_iter+0x873/0x1100 drivers/vhost/vhost.c:1061 __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 RSP: 0018:ffff888041ea7c00 EFLAGS: 00010246 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:251 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:350 RAX: dffffc0000000000 RBX: ffff888041ec0900 RCX: 0000000000000000 RDX: 0000000000000002 RSI: ffffffff857f16f5 RDI: ffff888041ec09c0 kasan_report mm/kasan/report.c:408 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:429 RBP: ffffed10083d8131 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: ffff8880a053c040 R12: 0000000000000002 R13: 0000000000000000 R14: dffffc0000000000 R15: 1ffff110083d4f87 find_first_zero_bit+0x84/0x90 lib/find_bit.c:105 FS: 00007f057cf92700(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000 bfs_create+0xfb/0x620 fs/bfs/dir.c:92 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055555631b708 CR3: 00000000a1aa6000 CR4: 00000000003406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 lookup_open+0x77a/0x1750 fs/namei.c:3241 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: do_last fs/namei.c:3334 [inline] path_openat+0xe08/0x2970 fs/namei.c:3571 call_write_iter include/linux/fs.h:1780 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44c/0x630 fs/read_write.c:482 do_filp_open+0x179/0x3c0 fs/namei.c:3605 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_sys_open+0x296/0x410 fs/open.c:1081 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f057ea200f9 RIP: 0033:0x7f6cdddeb0f9 RSP: 002b:00007f057cf92168 EFLAGS: 00000246 RSP: 002b:00007f6cdc35d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f057eb3ff80 RCX: 00007f057ea200f9 RAX: ffffffffffffffda RBX: 00007f6cddf0af80 RCX: 00007f6cdddeb0f9 RDX: 0000000000000048 RSI: 0000000020000100 RDI: 0000000000000003 RDX: 0000000000000241 RSI: 0000000020000040 RDI: ffffffffffffff9c RBP: 00007f057ea7bae9 R08: 0000000000000000 R09: 0000000000000000 RBP: 00007f6cdde46ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff4ee33f9f R14: 00007f057cf92300 R15: 0000000000022000 R13: 00007fff180bd61f R14: 00007f6cdc35d300 R15: 0000000000022000 Code: ff Allocated by task 9693: df 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 48 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 89 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] bfs_fill_super+0x3d5/0xd80 fs/bfs/inode.c:363 f9 mount_bdev+0x2b3/0x360 fs/super.c:1134 48 mount_fs+0x92/0x2a0 fs/super.c:1237 c1 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046 e9 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2572 [inline] do_mount+0xe65/0x2a30 fs/namespace.c:2905 03 SYSC_mount fs/namespace.c:3121 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3098 80 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 3c entry_SYSCALL_64_after_hwframe+0x5e/0xd3 01 Freed by task 7: 00 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 0f __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 85 aa_free_task_context+0xda/0x130 security/apparmor/context.c:54 c6 apparmor_cred_free+0x34/0x70 security/apparmor/lsm.c:58 06 security_cred_free+0x71/0xb0 security/security.c:1003 00 put_cred_rcu+0xe3/0x300 kernel/cred.c:117 00 __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+0x780/0x1180 kernel/rcu/tree.c:2946 4c __do_softirq+0x24d/0x9ff kernel/softirq.c:288 8b ab The buggy address belongs to the object at ffff8880a230d340 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880a230d340, ffff8880a230d360) c0 The buggy address belongs to the page: 00 page:ffffea000288c340 count:1 mapcount:0 mapping:ffff8880a230d000 index:0xffff8880a230dfc1 00 00 flags: 0xfff00000000100(slab) 48 raw: 00fff00000000100 ffff8880a230d000 ffff8880a230dfc1 000000010000003f b8 raw: ffffea00028c96e0 ffffea0002d30ca0 ffff88813fe741c0 0000000000000000 00 page dumped because: kasan: bad access detected 00 00 Memory state around the buggy address: 00 ffff8880a230d200: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc 00 ffff8880a230d280: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc fc >ffff8880a230d300: 05 fc fc fc fc fc fc fc 07 fc fc fc fc fc fc fc ff ^ df ffff8880a230d380: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc 4c ffff8880a230d400: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc 89 ================================================================== e9 48 c1 e9 03 <80> 3c 01 00 0f 85 8f 06 00 00 49 8b 6d 00 48 85 ed 0f 84 e4 03 RIP: vhost_umem_interval_tree_iter_first drivers/vhost/vhost.c:53 [inline] RSP: ffff888041ea7c00 RIP: vhost_del_umem_range drivers/vhost/vhost.c:977 [inline] RSP: ffff888041ea7c00 RIP: vhost_process_iotlb_msg drivers/vhost/vhost.c:1048 [inline] RSP: ffff888041ea7c00 RIP: vhost_chr_write_iter drivers/vhost/vhost.c:1077 [inline] RSP: ffff888041ea7c00 RIP: vhost_chr_write_iter+0x873/0x1100 drivers/vhost/vhost.c:1061 RSP: ffff888041ea7c00 ---[ end trace 3e112cbdda664e95 ]---