bisecting fixing commit since a1b977b49b66c75e6c51a515f6700371ae720217 building syzkaller on d32b0bbf2f8cfe548553c4012e2c0f79040d999f testing commit a1b977b49b66c75e6c51a515f6700371ae720217 with gcc (GCC) 8.1.0 kernel signature: 42e81a427c8d1b75656c8da1c9aaa9440153de2491f27d0cf541444826c2245b run #0: crashed: KASAN: use-after-free Read in diFree run #1: crashed: KASAN: use-after-free Read in diFree run #2: crashed: KASAN: use-after-free Read in diFree run #3: crashed: general protection fault in diFree run #4: crashed: KASAN: use-after-free Read in diFree run #5: crashed: KASAN: use-after-free Read in diFree run #6: crashed: general protection fault in diFree run #7: crashed: KASAN: use-after-free Read in diFree run #8: crashed: KASAN: use-after-free Read in diFree run #9: crashed: KASAN: use-after-free Read in diFree testing current HEAD 610bdbf6a174c9a91e34e276a9594114b44bef74 testing commit 610bdbf6a174c9a91e34e276a9594114b44bef74 with gcc (GCC) 8.1.0 kernel signature: 568522651def3d3a2522d1722effbe67f7ae06f66df8364348a2373377e6461c run #0: crashed: KASAN: use-after-free Read in diFree run #1: crashed: KASAN: use-after-free Read in diFree run #2: crashed: general protection fault in diFree run #3: crashed: general protection fault in diFree run #4: crashed: general protection fault in diFree run #5: crashed: general protection fault in diFree run #6: crashed: general protection fault in diFree run #7: crashed: KASAN: use-after-free Read in diFree run #8: crashed: KASAN: use-after-free Read in diFree run #9: crashed: KASAN: use-after-free Read in diFree revisions tested: 2, total time: 24m49.419415794s (build: 18m22.538399064s, test: 5m50.365460344s) the crash still happens on HEAD commit msg: Linux 4.19.166 crash: KASAN: use-after-free Read in diFree ERROR: (device loop5): xtSearch: XT_GETPAGE: xtree page corrupt ERROR: (device loop1): xtSearch: XT_GETPAGE: xtree page corrupt ERROR: (device loop3): xtSearch: XT_GETPAGE: xtree page corrupt ERROR: (device loop3): xtSearch: XT_GETPAGE: xtree page corrupt ================================================================== BUG: KASAN: use-after-free in diFree+0x1581/0x32f0 fs/jfs/jfs_imap.c:886 Read of size 4 at addr ffff8881cddd0c44 by task syz-executor.2/8087 CPU: 0 PID: 8087 Comm: syz-executor.2 Not tainted 4.19.166-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x17c/0x22a lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x307 mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 diFree+0x1581/0x32f0 fs/jfs/jfs_imap.c:886 jfs_evict_inode+0xd1/0x110 fs/jfs/inode.c:164 evict+0x29c/0x590 fs/inode.c:559 iput_final fs/inode.c:1555 [inline] iput+0x378/0x6b0 fs/inode.c:1581 diFreeSpecial+0x5d/0x80 fs/jfs/jfs_imap.c:563 jfs_umount+0xce/0x300 fs/jfs/jfs_umount.c:78 jfs_fill_super+0x625/0xb10 fs/jfs/super.c:633 mount_bdev+0x26f/0x330 fs/super.c:1158 jfs_do_mount+0x10/0x20 fs/jfs/super.c:703 mount_fs+0x7f/0x2a2 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 ksys_mount+0xba/0xe0 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:0x4608aa Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 ad 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 8a 89 fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f9fbc91ea88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f9fbc91eb20 RCX: 00000000004608aa RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f9fbc91eae0 RBP: 00007f9fbc91eae0 R08: 00007f9fbc91eb20 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000200 R15: 000000002006d200 Allocated by task 8087: 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 kmem_cache_alloc_trace+0x152/0x3a0 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] diMount+0x4d/0x690 fs/jfs/jfs_imap.c:118 jfs_mount+0x27f/0x340 fs/jfs/jfs_mount.c:190 jfs_fill_super+0x52c/0xb10 fs/jfs/super.c:589 mount_bdev+0x26f/0x330 fs/super.c:1158 jfs_do_mount+0x10/0x20 fs/jfs/super.c:703 mount_fs+0x7f/0x2a2 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 ksys_mount+0xba/0xe0 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 Freed by task 8087: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x13c/0x220 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 diUnmount+0xdb/0x120 fs/jfs/jfs_imap.c:210 jfs_umount+0xc6/0x300 fs/jfs/jfs_umount.c:76 jfs_fill_super+0x625/0xb10 fs/jfs/super.c:633 mount_bdev+0x26f/0x330 fs/super.c:1158 jfs_do_mount+0x10/0x20 fs/jfs/super.c:703 mount_fs+0x7f/0x2a2 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 ksys_mount+0xba/0xe0 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 The buggy address belongs to the object at ffff8881cddd0c40 which belongs to the cache kmalloc-32768 of size 32768 The buggy address is located 4 bytes inside of 32768-byte region [ffff8881cddd0c40, ffff8881cddd8c40) The buggy address belongs to the page: page:ffffea0007377400 count:1 mapcount:0 mapping:ffff8881f6002380 index:0x0 compound_mapcount: 0 flags: 0x17ffe0000008100(slab|head) raw: 017ffe0000008100 ffffea000760cc08 ffffea000759cc08 ffff8881f6002380 raw: 0000000000000000 ffff8881cddd0c40 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881cddd0b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881cddd0b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881cddd0c00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8881cddd0c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881cddd0d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================