bisecting fixing commit since a1b977b49b66c75e6c51a515f6700371ae720217 building syzkaller on 6e262c73cd452097096f0b4d5d96f5ae496bc021 testing commit a1b977b49b66c75e6c51a515f6700371ae720217 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: be0b15bb39c16766584298749c5751d0200377772d9517efb58b2dbadb1ef677 all runs: crashed: KASAN: slab-out-of-bounds Read in f2fs_build_segment_manager testing current HEAD 4938296e03bd227e5020d63d418956fe52baf97c testing commit 4938296e03bd227e5020d63d418956fe52baf97c compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 559f0f7142b8bfc3e7299bb633e1219546c2f6d1dcaae4f6eddc3832a0026aec all runs: crashed: KASAN: slab-out-of-bounds Read in f2fs_build_segment_manager revisions tested: 2, total time: 28m22.285061933s (build: 20m40.58814272s, test: 7m11.332051348s) the crash still happens on HEAD commit msg: Linux 4.19.198 crash: KASAN: slab-out-of-bounds Read in f2fs_build_segment_manager F2FS-fs (loop2): invalid crc value F2FS-fs (loop3): invalid crc value Bluetooth: hci4: command 0x0419 tx timeout Bluetooth: hci5: command 0x0419 tx timeout ================================================================== BUG: KASAN: slab-out-of-bounds in init_min_max_mtime fs/f2fs/segment.c:4161 [inline] BUG: KASAN: slab-out-of-bounds in f2fs_build_segment_manager+0x7fdf/0x8f50 fs/f2fs/segment.c:4243 IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready Read of size 8 at addr ffff8881f0f928e8 by task syz-executor.3/7564 CPU: 1 PID: 7564 Comm: syz-executor.3 Not tainted 4.19.198-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x17c/0x226 lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:396 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 init_min_max_mtime fs/f2fs/segment.c:4161 [inline] f2fs_build_segment_manager+0x7fdf/0x8f50 fs/f2fs/segment.c:4243 wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 f2fs_fill_super fs/f2fs/super.c:3016 [inline] f2fs_fill_super+0x318d/0x70f0 fs/f2fs/super.c:2803 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 mount_bdev+0x26f/0x330 fs/super.c:1158 f2fs_mount+0x10/0x20 fs/f2fs/super.c:3234 mount_fs+0x7f/0x2b0 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 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 ksys_mount+0xb1/0xd0 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 RIP: 0033:0x466d6a Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8f0179dfa8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000140 RCX: 0000000000466d6a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f8f0179e000 RBP: 00007f8f0179e040 R08: 00007f8f0179e040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f8f0179e000 R15: 0000000020000200 Allocated by task 7564: 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_node mm/slab.c:3689 [inline] __kmalloc_node+0x50/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] kvmalloc_node+0x68/0x70 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] f2fs_kvmalloc fs/f2fs/f2fs.h:2687 [inline] f2fs_kvzalloc fs/f2fs/f2fs.h:2693 [inline] build_sit_info+0x21b/0x2090 fs/f2fs/segment.c:3768 f2fs_build_segment_manager+0xc25/0x8f50 fs/f2fs/segment.c:4219 f2fs_fill_super fs/f2fs/super.c:3016 [inline] f2fs_fill_super+0x318d/0x70f0 fs/f2fs/super.c:2803 mount_bdev+0x26f/0x330 fs/super.c:1158 f2fs_mount+0x10/0x20 fs/f2fs/super.c:3234 mount_fs+0x7f/0x2b0 fs/super.c:1261 vfs_kern_mount.part.11+0x58/0x3d0 fs/namespace.c:961 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2469 [inline] do_mount+0x376/0x2710 fs/namespace.c:2799 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready ksys_mount+0xb1/0xd0 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 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready Freed by task 0: (stack is not available) IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready The buggy address belongs to the object at ffff8881f0f92440 which belongs to the cache kmalloc-2048 of size 2048 wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 The buggy address is located 1192 bytes inside of 2048-byte region [ffff8881f0f92440, ffff8881f0f92c40) The buggy address belongs to the page: wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 page:ffffea0007c3e480 count:1 mapcount:0 mapping:ffff8881f6000c40 index:0x0 compound_mapcount: 0 flags: 0x17ffe0000008100(slab|head) raw: 017ffe0000008100 ffffea0007cb1d08 ffffea0007c3bc08 ffff8881f6000c40 raw: 0000000000000000 ffff8881f0f92440 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881f0f92780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881f0f92800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881f0f92880: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff8881f0f92900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881f0f92980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Bluetooth: hci2: command 0x0419 tx timeout F2FS-fs (loop2): f2fs_check_nid_range: out-of-range nid=1, run fsck to fix. F2FS-fs (loop2): f2fs_check_nid_range: out-of-range nid=2, run fsck to fix. IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready f2fs_msg: 731 callbacks suppressed F2FS-fs (loop2): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop4): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop2): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop4): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop2): Fix alignment : done, start(4096) end(147456) block(12288) F2FS-fs (loop4): Fix alignment : done, start(4096) end(147456) block(12288) F2FS-fs (loop2): invalid crc value F2FS-fs (loop4): invalid crc value F2FS-fs (loop2): f2fs_check_nid_range: out-of-range nid=1, run fsck to fix. F2FS-fs (loop4): f2fs_check_nid_range: out-of-range nid=1, run fsck to fix. f2fs_msg: 1049 callbacks suppressed F2FS-fs (loop2): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop5): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop2): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop5): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop2): Fix alignment : done, start(4096) end(147456) block(12288)