bisecting fixing commit since b09c34517e1ac4018e3bb75ed5c8610a8a1f486b building syzkaller on 1880b4a9f394370a7d1fcb5c1cfca0fa1127b463 testing commit b09c34517e1ac4018e3bb75ed5c8610a8a1f486b with gcc (GCC) 8.1.0 kernel signature: b740d9ad36ed62bfad127b6c9375475b98be7bd7a0071cf3306a7c791f2d1171 all runs: crashed: KASAN: slab-out-of-bounds Read in find_first_zero_bit testing current HEAD 13d2ce42de8cb98ff952f8de6307f896203854c2 testing commit 13d2ce42de8cb98ff952f8de6307f896203854c2 with gcc (GCC) 8.1.0 kernel signature: 5c04a613c921fb12e6dab59ca0620c78d14e5ff9f7308c7ec110737d0f0c4f30 all runs: crashed: KASAN: slab-out-of-bounds Read in find_first_zero_bit revisions tested: 2, total time: 24m9.463941931s (build: 17m58.32004206s, test: 5m26.211843499s) the crash still happens on HEAD commit msg: Linux 4.19.163 crash: KASAN: slab-out-of-bounds Read in find_first_zero_bit IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready BFS-fs: bfs_fill_super(): loop5 is unclean, continuing IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready ================================================================== BUG: KASAN: slab-out-of-bounds in find_first_zero_bit+0xc5/0xd0 lib/find_bit.c:125 Read of size 8 at addr ffff8881e7475e40 by task syz-executor.5/7347 CPU: 0 PID: 7347 Comm: syz-executor.5 Not tainted 4.19.163-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+0x17c/0x22a lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x307 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 find_first_zero_bit+0xc5/0xd0 lib/find_bit.c:125 bfs_create+0xf0/0x606 fs/bfs/dir.c:91 lookup_open+0x780/0x1d00 fs/namei.c:3235 do_last fs/namei.c:3327 [inline] path_openat+0xeff/0x2870 fs/namei.c:3537 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready do_filp_open+0x177/0x250 fs/namei.c:3567 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready do_sys_open+0x1dd/0x350 fs/open.c:1085 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 __do_sys_openat fs/open.c:1112 [inline] __se_sys_openat fs/open.c:1106 [inline] __x64_sys_openat+0x98/0xf0 fs/open.c:1106 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45de29 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 Code: 0d b4 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 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fa786cb6c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000022a40 RCX: 000000000045de29 RDX: 00000000001015c2 RSI: 0000000020000440 RDI: ffffffffffffff9c RBP: 000000000118bf68 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffd4864253f R14: 00007fa786cb79c0 R15: 000000000118bf2c wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 Allocated by task 7347: wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15d/0x3d0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] kzalloc include/linux/slab.h:709 [inline] bfs_fill_super+0x385/0xe80 fs/bfs/inode.c:363 mount_bdev+0x26f/0x330 fs/super.c:1158 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 bfs_mount+0x10/0x20 fs/bfs/inode.c:468 mount_fs+0x7f/0x2a2 fs/super.c:1261 vfs_kern_mount.part.11+0x58/0x3d0 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2469 [inline] do_mount+0x376/0x2710 fs/namespace.c:2799 ksys_mount+0xba/0xe0 fs/namespace.c:3015 __do_sys_mount fs/namespace.c:3029 [inline] __se_sys_mount fs/namespace.c:3026 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3026 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 25: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x13c/0x220 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 mempool_exit+0xf6/0x190 mm/mempool.c:157 bioset_exit+0x76/0x2f0 block/bio.c:1876 __blk_release_queue+0x230/0x490 block/blk-sysfs.c:860 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2155 worker_thread+0x85/0xb60 kernel/workqueue.c:2298 kthread+0x347/0x410 kernel/kthread.c:259 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8881e7475e40 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8881e7475e40, ffff8881e7475e60) The buggy address belongs to the page: page:ffffea00079d1d40 count:1 mapcount:0 mapping:ffff8881f60001c0 index:0xffff8881e7475fc1 flags: 0x17ffe0000000100(slab) raw: 017ffe0000000100 ffffea0007ce2d48 ffffea0007cf8ec8 ffff8881f60001c0 raw: ffff8881e7475fc1 ffff8881e7475000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready Memory state around the buggy address: ffff8881e7475d00: fb fb fb fb fc fc fc fc 00 03 fc fc fc fc fc fc ffff8881e7475d80: 00 00 fc fc fc fc fc fc 00 00 fc fc fc fc fc fc >ffff8881e7475e00: 00 00 fc fc fc fc fc fc 07 fc fc fc fc fc fc fc ^ ffff8881e7475e80: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc ffff8881e7475f00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready