bisecting fixing commit since cbfa1702aaf69b2311ea1b35e04f113c48368c67 building syzkaller on 5ef9c29141f85f210b326ce68718498ae0c1fd35 testing commit cbfa1702aaf69b2311ea1b35e04f113c48368c67 with gcc (GCC) 8.4.1 20210217 kernel signature: 53461942d08306e67930ac13c8e9f0870429cc45825a73ccb02125e6583cf98c all runs: crashed: KASAN: slab-out-of-bounds Read in build_segment_manager testing current HEAD 29c52025152bab4c557d8174da58f1a4c8e70438 testing commit 29c52025152bab4c557d8174da58f1a4c8e70438 with gcc (GCC) 8.4.1 20210217 kernel signature: 3f22793da97d8ef0cb8f7169335833f178e22ed93b7d440ce0530fb2e7e0f9dc all runs: crashed: KASAN: slab-out-of-bounds Read in build_segment_manager revisions tested: 2, total time: 20m45.145035991s (build: 14m13.208931525s, test: 5m35.877774635s) the crash still happens on HEAD commit msg: Linux 4.14.221 crash: KASAN: slab-out-of-bounds Read in build_segment_manager batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 F2FS-fs (loop0): invalid crc value batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! ================================================================== batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 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+0x7c9b/0x8640 fs/f2fs/segment.c:3577 Read of size 8 at addr ffff8881d52f46a8 by task syz-executor.0/7257 CPU: 1 PID: 7257 Comm: syz-executor.0 Not tainted 4.14.221-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+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+0x7c9b/0x8640 fs/f2fs/segment.c:3577 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! f2fs_fill_super fs/f2fs/super.c:2581 [inline] f2fs_fill_super+0x27ef/0x5d70 fs/f2fs/super.c:2389 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:00007f9d3f001fa8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000140 RCX: 0000000000466c8a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f9d3f002000 RBP: 00007f9d3f002040 R08: 00007f9d3f002040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f9d3f002000 R15: 0000000020000200 Allocated by task 7257: 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/0x8640 fs/f2fs/segment.c:3553 f2fs_fill_super fs/f2fs/super.c:2581 [inline] f2fs_fill_super+0x27ef/0x5d70 fs/f2fs/super.c:2389 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 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 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 ffff8881d52f4200 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1192 bytes inside of 2048-byte region [ffff8881d52f4200, ffff8881d52f4a00) The buggy address belongs to the page: page:ffffea000754bd00 count:1 mapcount:0 mapping:ffff8881d52f4200 index:0x0 compound_mapcount: 0 flags: 0x17ffe0000008100(slab|head) raw: 017ffe0000008100 ffff8881d52f4200 0000000000000000 0000000100000003 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! raw: ffffea0007d3f020 ffffea0007cf9420 ffff8881f6000c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d52f4580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881d52f4600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881d52f4680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881d52f4700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881d52f4780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== F2FS-fs (loop2): Magic Mismatch, valid(0xf2f52010) - read(0x0) batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 F2FS-fs (loop2): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop2): Fix alignment : done, start(4096) end(147456) block(12288) F2FS-fs (loop2): invalid crc value F2FS-fs (loop2): inconsistent node block, nid:3, node_footer[nid:0,ino:0,ofs:0,cpver:0,blkaddr:0] batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! F2FS-fs (loop2): Failed to read root inode