================================================================== BUG: KASAN: slab-out-of-bounds in ntfs_list_ea fs/ntfs3/xattr.c:182 [inline] BUG: KASAN: slab-out-of-bounds in ntfs_listxattr+0x402/0x460 fs/ntfs3/xattr.c:710 Read of size 1 at addr ffff88801c6eb5bd by task syz-executor.2/8502 CPU: 1 PID: 8502 Comm: syz-executor.2 Not tainted 6.1.0-rc8-syzkaller-00014-g8ed710da2873 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x461 mm/kasan/report.c:395 kasan_report+0xbf/0x1f0 mm/kasan/report.c:495 ntfs_list_ea fs/ntfs3/xattr.c:182 [inline] ntfs_listxattr+0x402/0x460 fs/ntfs3/xattr.c:710 vfs_listxattr+0x109/0x190 fs/xattr.c:457 listxattr+0x70/0x180 fs/xattr.c:804 path_listxattr+0xae/0x140 fs/xattr.c:828 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f4e7568c0d9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f4e76342168 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3 RAX: ffffffffffffffda RBX: 00007f4e757abf80 RCX: 00007f4e7568c0d9 RDX: 00000000000000fc RSI: 0000000020000100 RDI: 00000000200000c0 RBP: 00007f4e756e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffedbc16b9f R14: 00007f4e76342300 R15: 0000000000022000 Allocated by task 8502: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0x5a/0xd0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] ntfs_read_ea+0x3e4/0x850 fs/ntfs3/xattr.c:110 ntfs_list_ea fs/ntfs3/xattr.c:168 [inline] ntfs_listxattr+0x16b/0x460 fs/ntfs3/xattr.c:710 vfs_listxattr+0x109/0x190 fs/xattr.c:457 listxattr+0x70/0x180 fs/xattr.c:804 path_listxattr+0xae/0x140 fs/xattr.c:828 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88801c6eb580 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 61 bytes inside of 64-byte region [ffff88801c6eb580, ffff88801c6eb5c0) The buggy address belongs to the physical page: page:ffffea000071bac0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801c6eb800 pfn:0x1c6eb flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000953948 ffffea00004bb0c8 ffff888012040200 raw: ffff88801c6eb800 ffff88801c6eb000 000000010000001e 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x242220(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 3749, tgid 3749 (syz-executor.1), ts 307935368574, free_ts 49489298422 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4291 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5558 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x94/0x390 mm/slab.c:2570 cache_alloc_refill+0x27f/0x380 mm/slab.c:2943 ____cache_alloc mm/slab.c:3019 [inline] ____cache_alloc mm/slab.c:3002 [inline] __do_cache_alloc mm/slab.c:3202 [inline] slab_alloc_node mm/slab.c:3250 [inline] __kmem_cache_alloc_node+0x44a/0x510 mm/slab.c:3549 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node_track_caller+0x4b/0xc0 mm/slab_common.c:975 kmemdup+0x2c/0x60 mm/util.c:129 kmemdup include/linux/fortify-string.h:585 [inline] sctp_addr_wq_mgmt+0x416/0x7c0 net/sctp/protocol.c:751 sctp_inet6addr_event+0x6e9/0x910 net/sctp/ipv6.c:94 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 atomic_notifier_call_chain+0x74/0x180 kernel/notifier.c:225 ipv6_add_addr+0x1266/0x1de0 net/ipv6/addrconf.c:1165 inet6_addr_add+0x412/0xae0 net/ipv6/addrconf.c:2969 inet6_rtm_newaddr+0xfa8/0x1a60 net/ipv6/addrconf.c:4927 rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6091 netlink_rcv_skb+0x157/0x430 net/netlink/af_netlink.c:2540 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x1d/0x4d0 mm/page_alloc.c:3483 slab_destroy mm/slab.c:1615 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1635 cache_flusharray mm/slab.c:3360 [inline] ___cache_free+0x2ac/0x3d0 mm/slab.c:3423 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x184/0x210 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slab.c:3257 [inline] __kmem_cache_alloc_node+0x266/0x510 mm/slab.c:3549 kmalloc_trace+0x26/0x60 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] tomoyo_print_bprm security/tomoyo/audit.c:26 [inline] tomoyo_init_log+0xc8a/0x1ed0 security/tomoyo/audit.c:264 tomoyo_supervisor+0x354/0xf10 security/tomoyo/common.c:2088 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x183/0x200 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0x13d2/0x1f80 security/tomoyo/domain.c:879 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:101 [inline] tomoyo_bprm_check_security+0x125/0x1b0 security/tomoyo/tomoyo.c:91 security_bprm_check+0x49/0xb0 security/security.c:869 search_binary_handler fs/exec.c:1715 [inline] exec_binprm fs/exec.c:1768 [inline] bprm_execve fs/exec.c:1837 [inline] bprm_execve+0x732/0x19f0 fs/exec.c:1799 Memory state around the buggy address: ffff88801c6eb480: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88801c6eb500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88801c6eb580: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ^ ffff88801c6eb600: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88801c6eb680: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ==================================================================