bisecting fixing commit since cbfa1702aaf69b2311ea1b35e04f113c48368c67 building syzkaller on 5ef9c29141f85f210b326ce68718498ae0c1fd35 testing commit cbfa1702aaf69b2311ea1b35e04f113c48368c67 with gcc (GCC) 8.1.0 kernel signature: 6068aa3b7591abd38bf70172020d724b30970ebe9e5040f83efa8ff0cc7d7305 all runs: crashed: KASAN: slab-out-of-bounds Read in build_segment_manager testing current HEAD 2b79150141611d3c6e1b55d4e70f49602482f0b8 testing commit 2b79150141611d3c6e1b55d4e70f49602482f0b8 with gcc (GCC) 8.1.0 kernel signature: d62bf5158dad8b07b4ee4a545675a5910fda8b01aaecab4e8d42b0a25959dc14 all runs: crashed: KASAN: slab-out-of-bounds Read in build_segment_manager revisions tested: 2, total time: 22m49.82785445s (build: 16m32.866733732s, test: 5m41.014903258s) the crash still happens on HEAD commit msg: Linux 4.14.203 crash: KASAN: slab-out-of-bounds Read in build_segment_manager F2FS-fs (loop1): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop1): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop1): Fix alignment : done, start(4096) end(147456) block(12288) 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 ffff88809c18c928 by task syz-executor.1/7892 CPU: 1 PID: 7892 Comm: syz-executor.1 Not tainted 4.14.203-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/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 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 ieee80211 phy4: ERP_CTS_PROT: 0 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x4608da RSP: 002b:00007f4afa0a2a88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f4afa0a2b20 RCX: 00000000004608da RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f4afa0a2ae0 RBP: 00007f4afa0a2ae0 R08: 00007f4afa0a2b20 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000140 R15: 0000000020000200 Allocated by task 7892: 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 ffff88809c18c480 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1192 bytes inside of 2048-byte region [ffff88809c18c480, ffff88809c18cc80) The buggy address belongs to the page: page:ffffea0002706300 count:1 mapcount:0 mapping:ffff88809c18c480 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff88809c18c480 0000000000000000 0000000100000003 raw: ffffea0002795e20 ffffea00027aa7a0 ffff8880b6400c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809c18c800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809c18c880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88809c18c900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88809c18c980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809c18ca00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ieee80211 phy4: ERP_PREAMBLE: 0