================================================================== BUG: KASAN: use-after-free in ntfs_attr_find+0xc02/0xce0 fs/ntfs/attrib.c:597 Read of size 2 at addr ffff888037600008 by task syz-executor.4/4536 CPU: 0 PID: 4536 Comm: syz-executor.4 Not tainted 6.0.0-rc6-syzkaller-00009-g60891ec99e14 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x6e9 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 ntfs_attr_find+0xc02/0xce0 fs/ntfs/attrib.c:597 ntfs_attr_lookup+0x1056/0x2070 fs/ntfs/attrib.c:1193 ntfs_read_inode_mount+0x89a/0x2580 fs/ntfs/inode.c:1845 ntfs_fill_super+0x17c7/0x9300 fs/ntfs/super.c:2854 mount_bdev+0x34d/0x410 fs/super.c:1400 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f966408a93a Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9665291f88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f966408a93a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f9665291fe0 RBP: 00007f9665292020 R08: 00007f9665292020 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f9665291fe0 R15: 0000000020079ca0 The buggy address belongs to the physical page: page:ffffea0000dd8000 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x37600 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0000dd8708 ffffea0000dd7f08 0000000000000000 raw: 0000000000000000 ffff888037600e80 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 1, migratetype Unmovable, gfp_mask 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 3643, tgid 3643 (udevd), ts 245413680118, free_ts 257194648270 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5515 __alloc_pages_node include/linux/gfp.h:243 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x75/0x360 mm/slab.c:2569 cache_alloc_refill+0x27f/0x380 mm/slab.c:2942 ____cache_alloc mm/slab.c:3018 [inline] ____cache_alloc mm/slab.c:3001 [inline] __do_cache_alloc mm/slab.c:3246 [inline] slab_alloc mm/slab.c:3287 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc+0x433/0x520 mm/slab.c:3491 getname_flags.part.0+0x50/0x4f0 fs/namei.c:139 getname_flags include/linux/audit.h:320 [inline] getname+0x8e/0xd0 fs/namei.c:218 do_sys_openat2+0xf5/0x4c0 fs/open.c:1307 do_sys_open fs/open.c:1329 [inline] __do_sys_openat fs/open.c:1345 [inline] __se_sys_openat fs/open.c:1340 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1340 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 slab_destroy mm/slab.c:1615 [inline] slabs_destroy+0x89/0xc0 mm/slab.c:1635 cache_flusharray mm/slab.c:3389 [inline] ___cache_free+0x2a8/0x3d0 mm/slab.c:3452 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1b0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:447 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:727 [inline] slab_alloc_node mm/slab.c:3232 [inline] kmem_cache_alloc_node_trace+0x308/0x570 mm/slab.c:3601 __do_kmalloc_node mm/slab.c:3623 [inline] __kmalloc_node+0x38/0x60 mm/slab.c:3631 kmalloc_node include/linux/slab.h:623 [inline] kvmalloc_node+0x3e/0x190 mm/util.c:613 kvmalloc include/linux/slab.h:750 [inline] simple_xattr_alloc+0x43/0xa0 fs/xattr.c:1015 shmem_initxattrs+0x10c/0x220 mm/shmem.c:3230 security_inode_init_security+0x1c4/0x370 security/security.c:1117 shmem_mknod+0xc9/0x1f0 mm/shmem.c:2895 vfs_mknod+0x4d2/0x7e0 fs/namei.c:3892 handle_create+0x340/0x4b3 drivers/base/devtmpfs.c:226 Memory state around the buggy address: ffff8880375fff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880375fff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888037600000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888037600080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888037600100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================