BFS-fs: bfs_fill_super(): loop3 is unclean, continuing ================================================================== BUG: KASAN: slab-out-of-bounds in find_first_zero_bit+0x84/0x90 lib/find_bit.c:105 Read of size 8 at addr ffff8880a420cbc0 by task syz-executor.3/10637 CPU: 1 PID: 10637 Comm: syz-executor.3 Not tainted 4.14.215-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/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430 find_first_zero_bit+0x84/0x90 lib/find_bit.c:105 bfs_create+0xfb/0x620 fs/bfs/dir.c:92 vfs_create+0x3e3/0x620 fs/namei.c:2935 SYSC_mknodat fs/namei.c:3804 [inline] SyS_mknodat+0x2f4/0x470 fs/namei.c:3781 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45e219 RSP: 002b:00007f367d9ecc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000103 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045e219 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000005 RBP: 000000000119bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffd7066194f R14: 00007f367d9ed9c0 R15: 000000000119bf8c Allocated by task 10637: audit: type=1800 audit(1610494569.351:7): pid=10658 uid=0 auid=0 ses=4 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="sda1" ino=15936 res=0 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:2549 [inline] do_mount+0xe53/0x2a00 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3072 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 7: 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 aa_free_task_context+0xda/0x130 security/apparmor/context.c:54 apparmor_cred_free+0x34/0x70 security/apparmor/lsm.c:58 security_cred_free+0x71/0xb0 security/security.c:1003 put_cred_rcu+0xe3/0x300 kernel/cred.c:117 __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 __do_softirq+0x254/0xa1d kernel/softirq.c:288 The buggy address belongs to the object at ffff8880a420cbc0 which belongs to the cache kmalloc-32 of size 32 audit: type=1800 audit(1610494569.471:8): pid=10658 uid=0 auid=0 ses=4 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="/" dev="fuse" ino=1 res=0 The buggy address is located 0 bytes inside of 32-byte region [ffff8880a420cbc0, ffff8880a420cbe0) The buggy address belongs to the page: page:ffffea0002908300 count:1 mapcount:0 mapping:ffff8880a420c000 index:0xffff8880a420cfc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880a420c000 ffff8880a420cfc1 000000010000003f raw: ffffea0002c69ce0 ffffea0002d2cf20 ffff88813fe801c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a420ca80: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a420cb00: fb fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc >ffff8880a420cb80: fb fb fb fb fc fc fc fc 07 fc fc fc fc fc fc fc ^ ffff8880a420cc00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a420cc80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================