bisecting fixing commit since cbfa1702aaf69b2311ea1b35e04f113c48368c67 building syzkaller on 54289b0835634ca07a8117613c48b73e9e647d13 testing commit cbfa1702aaf69b2311ea1b35e04f113c48368c67 with gcc (GCC) 8.1.0 kernel signature: 1e870dc64d831d29389555cafa78d6bc9776a67c893f7857df320a937fe4aa12 all runs: crashed: KASAN: slab-out-of-bounds Read in find_first_zero_bit testing current HEAD 3f2ecb86cb909da0b9157fd2952ad79924cbe5ae testing commit 3f2ecb86cb909da0b9157fd2952ad79924cbe5ae with gcc (GCC) 8.1.0 kernel signature: a9b3887605ad0f65a886b9e77b212ec1db87911948669e413efa19ab2b5dcdde all runs: crashed: KASAN: slab-out-of-bounds Read in find_first_zero_bit revisions tested: 2, total time: 23m20.472879906s (build: 16m59.952027323s, test: 5m28.327716606s) the crash still happens on HEAD commit msg: Linux 4.14.212 crash: KASAN: slab-out-of-bounds Read in find_first_zero_bit IPv6: ADDRCONF(NETDEV_UP): vlan1: link is not ready BFS-fs: bfs_fill_super(): loop3 is unclean, continuing IPv6: ADDRCONF(NETDEV_UP): veth0_to_batadv: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1_vlan: link is not ready ================================================================== BUG: KASAN: slab-out-of-bounds in find_first_zero_bit+0xc5/0xd0 lib/find_bit.c:105 Read of size 8 at addr ffff8881dfb50d40 by task syz-executor.3/7213 IPv6: ADDRCONF(NETDEV_CHANGE): macsec0: link becomes ready CPU: 0 PID: 7213 Comm: syz-executor.3 Not tainted 4.14.212-syzkaller #0 IPv6: ADDRCONF(NETDEV_CHANGE): veth1_vlan: link becomes ready Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: IPv6: ADDRCONF(NETDEV_CHANGE): veth0_vlan: link becomes ready __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x14b/0x1f1 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.7+0x11a/0x2d4 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 find_first_zero_bit+0xc5/0xd0 lib/find_bit.c:105 IPv6: ADDRCONF(NETDEV_UP): veth1_to_batadv: link is not ready bfs_create+0xf0/0x610 fs/bfs/dir.c:92 lookup_open+0x744/0x1c10 fs/namei.c:3241 do_last fs/namei.c:3334 [inline] path_openat+0xe85/0x27a0 fs/namei.c:3569 do_filp_open+0x16b/0x220 fs/namei.c:3603 device veth0_vlan entered promiscuous mode do_sys_open+0x1c2/0x340 fs/open.c:1081 IPv6: ADDRCONF(NETDEV_CHANGE): vlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vlan1: link becomes ready batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 SYSC_openat fs/open.c:1108 [inline] SyS_openat+0xf/0x20 fs/open.c:1102 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45e179 RSP: 002b:00007f4589fbac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000022600 RCX: 000000000045e179 RDX: 00000000001015c2 RSI: 0000000020000440 RDI: ffffffffffffff9c RBP: 000000000118cf88 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007fffe2b7ddaf R14: 00007f4589fbb9c0 R15: 000000000118cf4c Allocated by task 7213: batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15d/0x410 mm/slab.c:3729 IPv6: ADDRCONF(NETDEV_UP): batadv_slave_0: link is not ready kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] bfs_fill_super+0x385/0xe80 fs/bfs/inode.c:363 batman_adv: batadv0: Interface activated: batadv_slave_0 mount_bdev+0x26f/0x330 fs/super.c:1134 device veth1_vlan entered promiscuous mode bfs_mount+0x10/0x20 fs/bfs/inode.c:468 IPv6: ADDRCONF(NETDEV_UP): macvlan0: link is not ready mount_fs+0x7f/0x269 fs/super.c:1237 vfs_kern_mount.part.9+0x58/0x3c0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0x352/0x2af0 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xb1/0xd0 fs/namespace.c:3072 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 3341: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xab/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 kzfree+0x26/0x30 mm/slab_common.c:1453 ieee80211 phy4: mac80211_hwsim_start aa_free_task_context+0xa5/0xe0 security/apparmor/context.c:54 apparmor_cred_free+0x34/0x70 security/apparmor/lsm.c:58 security_cred_free+0x66/0xa0 security/security.c:1003 put_cred_rcu+0xd0/0x2d0 kernel/cred.c:117 __put_cred+0x184/0x1e0 kernel/cred.c:151 put_cred include/linux/cred.h:271 [inline] SYSC_faccessat fs/open.c:444 [inline] SyS_faccessat+0x40f/0x630 fs/open.c:353 SYSC_access fs/open.c:450 [inline] SyS_access+0x13/0x20 fs/open.c:448 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8881dfb50d40 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8881dfb50d40, ffff8881dfb50d60) The buggy address belongs to the page: ieee80211 phy4: mac80211_hwsim_add_interface (type=1 mac_addr=02:00:00:00:04:00) page:ffffea00077ed400 count:1 mapcount:0 mapping:ffff8881dfb50000 index:0xffff8881dfb50fc1 flags: 0x17ffe0000000100(slab) raw: 017ffe0000000100 ffff8881dfb50000 ffff8881dfb50fc1 000000010000003f raw: ffffea0007cbbe20 ffffea00077c4120 ffff8881f60001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881dfb50c00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8881dfb50c80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8881dfb50d00: fb fb fb fb fc fc fc fc 07 fc fc fc fc fc fc fc ^ ffff8881dfb50d80: 07 fc fc fc fc fc fc fc 07 fc fc fc fc fc fc fc ffff8881dfb50e00: 07 fc fc fc fc fc fc fc 07 fc fc fc fc fc fc fc ==================================================================