bisecting fixing commit since cbfa1702aaf69b2311ea1b35e04f113c48368c67 building syzkaller on 5ef9c29141f85f210b326ce68718498ae0c1fd35 testing commit cbfa1702aaf69b2311ea1b35e04f113c48368c67 with gcc (GCC) 8.4.1 20210217 kernel signature: f4e64b546909cdd5d81fa2a1d22372556ad59f41de9ee20dbb0ba1c2634837fa all runs: crashed: KASAN: slab-out-of-bounds Read in build_segment_manager testing current HEAD 7d7d1c0ab3eb7c8d8f63a126535018007823b207 testing commit 7d7d1c0ab3eb7c8d8f63a126535018007823b207 with gcc (GCC) 8.4.1 20210217 kernel signature: f15322e009fcc14d0780b2bc92aead3cfb6e8cd1480242aea0777821325a4b65 all runs: crashed: KASAN: slab-out-of-bounds Read in build_segment_manager revisions tested: 2, total time: 32m12.183882675s (build: 25m4.883208193s, test: 6m30.831145217s) the crash still happens on HEAD commit msg: Linux 4.14.232 crash: KASAN: slab-out-of-bounds Read in build_segment_manager IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready F2FS-fs (loop3): Fix alignment : done, start(4096) end(147456) block(12288) ================================================================== F2FS-fs (loop3): invalid crc value BUG: KASAN: slab-out-of-bounds in init_min_max_mtime fs/f2fs/segment.c:3497 [inline] BUG: KASAN: slab-out-of-bounds in build_segment_manager+0x806e/0x8690 fs/f2fs/segment.c:3577 Read of size 8 at addr ffff8881d45bb168 by task syz-executor.2/7270 CPU: 0 PID: 7270 Comm: syz-executor.2 Not tainted 4.14.232-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 F2FS-fs (loop3): inconsistent node block, nid:3, node_footer[nid:0,ino:0,ofs:0,cpver:0,blkaddr:0] Call Trace: F2FS-fs (loop3): Failed to read root inode __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x14b/0x1e7 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 mm/kasan/report.c:409 [inline] kasan_report.cold.7+0x11a/0x2d3 mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 init_min_max_mtime fs/f2fs/segment.c:3497 [inline] build_segment_manager+0x806e/0x8690 fs/f2fs/segment.c:3577 f2fs_fill_super fs/f2fs/super.c:2581 [inline] f2fs_fill_super+0x27ef/0x5d70 fs/f2fs/super.c:2389 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 mount_bdev+0x26f/0x330 fs/super.c:1134 f2fs_mount+0x10/0x20 fs/f2fs/super.c:2776 mount_fs+0x7f/0x270 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 RIP: 0033:0x466c8a RSP: 002b:00007f15c3257fa8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000140 RCX: 0000000000466c8a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f15c3258000 RBP: 00007f15c3258040 R08: 00007f15c3258040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f15c3258000 R15: 0000000020000200 Allocated by task 7270: 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_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x50/0x70 mm/slab.c:3689 kmalloc_node include/linux/slab.h:530 [inline] kvmalloc_node+0x70/0x80 mm/util.c:397 kvmalloc include/linux/mm.h:531 [inline] kvzalloc include/linux/mm.h:539 [inline] build_sit_info fs/f2fs/segment.c:3108 [inline] build_segment_manager+0x9f8/0x8690 fs/f2fs/segment.c:3553 f2fs_fill_super fs/f2fs/super.c:2581 [inline] f2fs_fill_super+0x27ef/0x5d70 fs/f2fs/super.c:2389 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 mount_bdev+0x26f/0x330 fs/super.c:1134 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 f2fs_mount+0x10/0x20 fs/f2fs/super.c:2776 mount_fs+0x7f/0x270 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 0: (stack is not available) The buggy address belongs to the object at ffff8881d45bacc0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1192 bytes inside of 2048-byte region [ffff8881d45bacc0, ffff8881d45bb4c0) The buggy address belongs to the page: page:ffffea0007516e80 count:1 mapcount:0 mapping:ffff8881d45ba440 index:0x0 compound_mapcount: 0 flags: 0x17ffe0000008100(slab|head) raw: 017ffe0000008100 ffff8881d45ba440 0000000000000000 0000000100000003 raw: ffffea0007560da0 ffffea0007cfff20 ffff8881f6000c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d45bb000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881d45bb080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881d45bb100: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff8881d45bb180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881d45bb200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes 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_UP): wlan1: link is not ready IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready 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): wlan1: link is not ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready f2fs_msg: 858 callbacks suppressed F2FS-fs (loop3): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop0): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop3): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop2): inconsistent node block, nid:3, node_footer[nid:0,ino:0,ofs:0,cpver:0,blkaddr:0] F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop5): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop4): inconsistent node block, nid:3, node_footer[nid:0,ino:0,ofs:0,cpver:0,blkaddr:0] F2FS-fs (loop2): Failed to read root inode F2FS-fs (loop1): inconsistent node block, nid:3, node_footer[nid:0,ino:0,ofs:0,cpver:0,blkaddr:0] F2FS-fs (loop5): Can't find valid F2FS filesystem in 1th superblock f2fs_msg: 1004 callbacks suppressed F2FS-fs (loop5): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop5): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop5): Fix alignment : done, start(4096) end(147456) block(12288) F2FS-fs (loop5): invalid crc value F2FS-fs (loop0): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop1): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop0): Fix alignment : done, start(4096) end(147456) block(12288) F2FS-fs (loop4): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop2): Magic Mismatch, valid(0xf2f52010) - read(0x0)