================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x8ce/0x1f60 fs/ext4/xattr.c:1781 Read of size 18446744073709551572 at addr ffff88807bf82050 by task syz.4.82/6281 CPU: 1 UID: 0 PID: 6281 Comm: syz.4.82 Not tainted 6.13.0-rc1-next-20241203-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memmove+0x29/0x70 mm/kasan/shadow.c:94 ext4_xattr_set_entry+0x8ce/0x1f60 fs/ext4/xattr.c:1781 ext4_xattr_block_set+0x926/0x3160 fs/ext4/xattr.c:2028 ext4_xattr_move_to_block fs/ext4/xattr.c:2670 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2745 [inline] ext4_expand_extra_isize_ea+0x12d7/0x1cf0 fs/ext4/xattr.c:2837 __ext4_expand_extra_isize+0x2fb/0x3e0 fs/ext4/inode.c:5889 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5932 [inline] __ext4_mark_inode_dirty+0x524/0x880 fs/ext4/inode.c:6010 __ext4_unlink+0x6c2/0xb50 fs/ext4/namei.c:3298 ext4_unlink+0x1bf/0x5a0 fs/ext4/namei.c:3327 vfs_unlink+0x365/0x650 fs/namei.c:4523 do_unlinkat+0x4ae/0x830 fs/namei.c:4587 __do_sys_unlink fs/namei.c:4635 [inline] __se_sys_unlink fs/namei.c:4633 [inline] __x64_sys_unlink+0x47/0x50 fs/namei.c:4633 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb7b397ff19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb7b46b7058 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007fb7b3b46080 RCX: 00007fb7b397ff19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000180 RBP: 00007fb7b39f3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fb7b3b46080 R15: 00007ffe4c79db88 Allocated by task 6281: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4283 [inline] __kmalloc_node_track_caller_noprof+0x28b/0x4c0 mm/slub.c:4302 kmemdup_noprof+0x2a/0x60 mm/util.c:135 ext4_xattr_block_set+0x7a5/0x3160 fs/ext4/xattr.c:1976 ext4_xattr_move_to_block fs/ext4/xattr.c:2670 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2745 [inline] ext4_expand_extra_isize_ea+0x12d7/0x1cf0 fs/ext4/xattr.c:2837 __ext4_expand_extra_isize+0x2fb/0x3e0 fs/ext4/inode.c:5889 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5932 [inline] __ext4_mark_inode_dirty+0x524/0x880 fs/ext4/inode.c:6010 __ext4_unlink+0x6c2/0xb50 fs/ext4/namei.c:3298 ext4_unlink+0x1bf/0x5a0 fs/ext4/namei.c:3327 vfs_unlink+0x365/0x650 fs/namei.c:4523 do_unlinkat+0x4ae/0x830 fs/namei.c:4587 __do_sys_unlink fs/namei.c:4635 [inline] __se_sys_unlink fs/namei.c:4633 [inline] __x64_sys_unlink+0x47/0x50 fs/namei.c:4633 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88807bf82000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 80 bytes inside of 1024-byte region [ffff88807bf82000, ffff88807bf82400) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7bf80 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801ac41dc0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801ac41dc0 dead000000000100 dead000000000122 head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0001efe001 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5866, tgid 5866 (syz-executor), ts 71877036008, free_ts 71846333103 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1555 prep_new_page mm/page_alloc.c:1563 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3481 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4758 alloc_pages_mpol+0x30e/0x550 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2408 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2574 new_slab mm/slub.c:2627 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3815 __slab_alloc+0x58/0xa0 mm/slub.c:3905 __slab_alloc_node mm/slub.c:3980 [inline] slab_alloc_node mm/slub.c:4141 [inline] __do_kmalloc_node mm/slub.c:4282 [inline] __kmalloc_node_noprof+0x2ee/0x4d0 mm/slub.c:4289 kmalloc_node_noprof include/linux/slab.h:928 [inline] qdisc_alloc+0x9a/0xa80 net/sched/sch_generic.c:952 qdisc_create_dflt+0x62/0x4b0 net/sched/sch_generic.c:1014 attach_one_default_qdisc net/sched/sch_generic.c:1180 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2562 [inline] attach_default_qdiscs net/sched/sch_generic.c:1198 [inline] dev_activate+0x3c0/0x1240 net/sched/sch_generic.c:1257 __dev_open+0x352/0x450 net/core/dev.c:1485 __dev_change_flags+0x1e2/0x6f0 net/core/dev.c:8943 dev_change_flags+0x8b/0x1a0 net/core/dev.c:9015 vlan_device_event+0x1b81/0x1de0 net/8021q/vlan.c:468 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 page last free pid 5866 tgid 5866 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe09/0x10e0 mm/page_alloc.c:2664 discard_slab mm/slub.c:2673 [inline] __put_partials+0x160/0x1c0 mm/slub.c:3142 put_cpu_partial+0x17c/0x250 mm/slub.c:3217 __slab_free+0x290/0x380 mm/slub.c:4468 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4104 [inline] slab_alloc_node mm/slub.c:4153 [inline] kmem_cache_alloc_node_noprof+0x1d9/0x380 mm/slub.c:4205 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1323 [inline] nlmsg_new include/net/netlink.h:1018 [inline] netlink_ack+0x145/0xa50 net/netlink/af_netlink.c:2479 netlink_rcv_skb+0x262/0x430 net/netlink/af_netlink.c:2548 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:726 __sys_sendto+0x363/0x4c0 net/socket.c:2197 __do_sys_sendto net/socket.c:2204 [inline] __se_sys_sendto net/socket.c:2200 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2200 Memory state around the buggy address: ffff88807bf81f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807bf81f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807bf82000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88807bf82080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807bf82100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================