bisecting fixing commit since 0adb32858b0bddf4ada5f364a84ed60b196dbcda building syzkaller on dc88925771c47ef787f6f3a7b6756b8f0ce40af5 testing commit 0adb32858b0bddf4ada5f364a84ed60b196dbcda with gcc (GCC) 8.1.0 kernel signature: 4e9f223c1c1e4e5472e0a963548793752cd699c0da5fb010cc1d517d7e393c0d run #0: crashed: KASAN: use-after-free Read in ntfs_attr_find run #1: crashed: KASAN: slab-out-of-bounds Read in ntfs_attr_find run #2: crashed: KASAN: use-after-free Read in ntfs_attr_find run #3: crashed: KASAN: use-after-free Read in ntfs_attr_find run #4: crashed: KASAN: use-after-free Read in ntfs_attr_find run #5: crashed: KASAN: out-of-bounds Read in ntfs_attr_find run #6: crashed: KASAN: slab-out-of-bounds Read in ntfs_attr_find run #7: crashed: KASAN: use-after-free Read in ntfs_attr_find run #8: crashed: KASAN: use-after-free Read in ntfs_attr_find run #9: crashed: KASAN: slab-out-of-bounds Read in ntfs_attr_find testing current HEAD 0a679e13ea30f85a1aef0669ee0c5a9fd7860b34 testing commit 0a679e13ea30f85a1aef0669ee0c5a9fd7860b34 with gcc (GCC) 8.1.0 kernel signature: 6810dfe65f24eb0510ad18ddc20605164ce84841c3a6f57bb995fc1529ad71f6 run #0: crashed: KASAN: use-after-free Read in ntfs_attr_find run #1: crashed: KASAN: slab-out-of-bounds Read in ntfs_attr_find run #2: crashed: KASAN: slab-out-of-bounds Read in ntfs_attr_find run #3: crashed: KASAN: slab-out-of-bounds Read in ntfs_attr_find run #4: crashed: KASAN: use-after-free Read in ntfs_attr_find run #5: crashed: KASAN: use-after-free Read in ntfs_attr_find run #6: crashed: KASAN: use-after-free Read in ntfs_attr_find run #7: crashed: KASAN: use-after-free Read in ntfs_attr_find run #8: crashed: KASAN: slab-out-of-bounds Read in ntfs_attr_find run #9: crashed: KASAN: use-after-free Read in ntfs_attr_find revisions tested: 2, total time: 17m15.187944818s (build: 10m26.871960683s, test: 6m7.011582086s) the crash still happens on HEAD commit msg: Merge branch 'for-5.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup crash: KASAN: use-after-free Read in ntfs_attr_find IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 ntfs: (device loop2): is_boot_sector_ntfs(): Invalid end of sector marker. ================================================================== BUG: KASAN: use-after-free in ntfs_attr_find+0x9df/0xb00 fs/ntfs/attrib.c:599 Read of size 4 at addr ffff8881c8406d35 by task syz-executor2/4459 CPU: 0 PID: 4459 Comm: syz-executor2 Not tainted 5.6.0-rc1-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+0x12f/0x187 lib/dump_stack.c:118 print_address_description.constprop.8+0x3b/0x60 mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 __asan_report_load_n_noabort+0xf/0x20 mm/kasan/generic_report.c:145 ntfs_attr_find+0x9df/0xb00 fs/ntfs/attrib.c:599 ntfs_external_attr_find fs/ntfs/attrib.c:1093 [inline] ntfs_attr_lookup+0x10c9/0x23c0 fs/ntfs/attrib.c:1191 ntfs_read_inode_mount+0x6bf/0x20c0 fs/ntfs/inode.c:1832 ntfs_fill_super+0x1217/0x2d40 fs/ntfs/super.c:2857 mount_bdev+0x27b/0x340 fs/super.c:1417 ntfs_mount+0x10/0x20 fs/ntfs/super.c:3051 legacy_get_tree+0x103/0x1f0 fs/fs_context.c:622 vfs_get_tree+0x8b/0x2d0 fs/super.c:1547 do_new_mount fs/namespace.c:2822 [inline] do_mount+0x1285/0x1b70 fs/namespace.c:3107 __do_sys_mount fs/namespace.c:3316 [inline] __se_sys_mount fs/namespace.c:3293 [inline] __x64_sys_mount+0x169/0x1c0 fs/namespace.c:3293 do_syscall_64+0xd0/0x600 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457dea Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 dd 8f 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 ba 8f fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f2290159bb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 0000000000457dea RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f2290159c00 RBP: 0000000000000002 R08: 000000002007e200 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 000000000000066c R14: 00000000006fbac0 R15: 0000000000000000 Allocated by task 4329: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.7+0xc1/0xd0 mm/kasan/common.c:515 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:523 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x121/0x740 mm/slab.c:3484 getname_flags+0xb8/0x510 fs/namei.c:138 user_path_at_empty+0x1e/0x40 fs/namei.c:2746 user_path_at include/linux/namei.h:58 [inline] vfs_statx+0xbf/0x140 fs/stat.c:197 vfs_stat include/linux/fs.h:3271 [inline] __do_sys_newstat+0x85/0xe0 fs/stat.c:351 __se_sys_newstat fs/stat.c:347 [inline] __x64_sys_newstat+0x4f/0x70 fs/stat.c:347 do_syscall_64+0xd0/0x600 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4329: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x86/0x2e0 mm/slab.c:3694 putname+0xa8/0xe0 fs/namei.c:259 filename_lookup.part.62+0x1e2/0x320 fs/namei.c:2475 filename_lookup fs/namei.c:2459 [inline] user_path_at_empty+0x39/0x40 fs/namei.c:2746 user_path_at include/linux/namei.h:58 [inline] vfs_statx+0xbf/0x140 fs/stat.c:197 vfs_stat include/linux/fs.h:3271 [inline] __do_sys_newstat+0x85/0xe0 fs/stat.c:351 __se_sys_newstat fs/stat.c:347 [inline] __x64_sys_newstat+0x4f/0x70 fs/stat.c:347 do_syscall_64+0xd0/0x600 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8881c8406740 which belongs to the cache names_cache of size 4096 The buggy address is located 1525 bytes inside of 4096-byte region [ffff8881c8406740, ffff8881c8407740) The buggy address belongs to the page: page:ffffea0007210180 refcount:1 mapcount:0 mapping:ffff8881da199a80 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea0007213b88 ffffea0007211588 ffff8881da199a80 raw: 0000000000000000 ffff8881c8406740 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c8406c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c8406c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881c8406d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881c8406d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c8406e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================