bisecting fixing commit since cbfa1702aaf69b2311ea1b35e04f113c48368c67 building syzkaller on 5ef9c29141f85f210b326ce68718498ae0c1fd35 testing commit cbfa1702aaf69b2311ea1b35e04f113c48368c67 with gcc (GCC) 8.1.0 kernel signature: f2f57b352627e1a3b4de4b71e63071b9865f304dab4bbc1879643fb3d1aa342d all runs: crashed: KASAN: slab-out-of-bounds Read in build_segment_manager testing current HEAD 1752938529c614a8ed4432ecce6ebc95d3b87207 testing commit 1752938529c614a8ed4432ecce6ebc95d3b87207 with gcc (GCC) 8.1.0 kernel signature: 5ec76a3009e6da7e240e91cc9c282efca81ee7c18ab73d1764f59e867223a5ac all runs: crashed: KASAN: slab-out-of-bounds Read in build_segment_manager revisions tested: 2, total time: 22m5.292016832s (build: 16m23.332285533s, test: 5m12.020963045s) the crash still happens on HEAD commit msg: Linux 4.14.213 crash: KASAN: slab-out-of-bounds Read in build_segment_manager IPv6: ADDRCONF(NETDEV_CHANGE): veth1_macvtap: link becomes ready F2FS-fs (loop1): Fix alignment : done, start(4096) end(147456) block(12288) IPv6: ADDRCONF(NETDEV_CHANGE): veth0_macvtap: link becomes ready F2FS-fs (loop1): 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+0x7ca1/0x8660 fs/f2fs/segment.c:3577 Read of size 8 at addr ffff8881cffb5aa8 by task syz-executor.2/7258 CPU: 1 PID: 7258 Comm: syz-executor.2 Not tainted 4.14.213-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: F2FS-fs (loop1): inconsistent node block, nid:3, node_footer[nid:0,ino:0,ofs:0,cpver:0,blkaddr:0] __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 init_min_max_mtime fs/f2fs/segment.c:3497 [inline] build_segment_manager+0x7ca1/0x8660 fs/f2fs/segment.c:3577 f2fs_fill_super+0x282d/0x5d40 fs/f2fs/super.c:2581 F2FS-fs (loop1): Failed to read root inode mount_bdev+0x26f/0x330 fs/super.c:1134 f2fs_mount+0x10/0x20 fs/f2fs/super.c:2776 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 RIP: 0033:0x4608da RSP: 002b:00007fd45bdcda88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fd45bdcdb20 RCX: 00000000004608da RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fd45bdcdae0 RBP: 00007fd45bdcdae0 R08: 00007fd45bdcdb20 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000140 R15: 0000000020000200 Allocated by task 7258: 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/0x8660 fs/f2fs/segment.c:3553 f2fs_fill_super+0x282d/0x5d40 fs/f2fs/super.c:2581 mount_bdev+0x26f/0x330 fs/super.c:1134 f2fs_mount+0x10/0x20 fs/f2fs/super.c:2776 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 0: (stack is not available) The buggy address belongs to the object at ffff8881cffb5600 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1192 bytes inside of 2048-byte region [ffff8881cffb5600, ffff8881cffb5e00) The buggy address belongs to the page: page:ffffea00073fed00 count:1 mapcount:0 mapping:ffff8881cffb4500 index:0x0 compound_mapcount: 0 flags: 0x17ffe0000008100(slab|head) raw: 017ffe0000008100 ffff8881cffb4500 0000000000000000 0000000100000003 raw: ffffea0007528aa0 ffffea00078fe9a0 ffff8881f6000c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881cffb5980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881cffb5a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881cffb5a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881cffb5b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881cffb5b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== device veth0_macvtap entered promiscuous mode