EXT4-fs (loop2): 1 truncate cleaned up EXT4-fs (loop2): mounted filesystem without journal. Opts: init_itable=0x0000000000000000,jqfmt=vfsold,debug_want_extra_isize=0x000000000000006a,user_xattr,errors=remount-ro,quota,. Quota mode: writeback. ================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x13a3/0x37d0 fs/ext4/xattr.c:1747 Read of size 18446744073709551540 at addr ffff888112273070 by task syz.2.5759/20758 CPU: 1 PID: 20758 Comm: syz.2.5759 Not tainted 5.15.185-syzkaller-00032-g0d918fa8e88d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x280/0x290 mm/kasan/generic.c:189 memmove+0x2d/0x70 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0x13a3/0x37d0 fs/ext4/xattr.c:1747 ext4_xattr_block_set+0x8cd/0x2cb0 fs/ext4/xattr.c:2004 ext4_xattr_set_handle+0xba5/0x12b0 fs/ext4/xattr.c:2412 ext4_xattr_set+0x22a/0x320 fs/ext4/xattr.c:2522 ext4_xattr_trusted_set+0x3c/0x50 fs/ext4/xattr_trusted.c:38 __vfs_setxattr+0x3e1/0x430 fs/xattr.c:182 __vfs_setxattr_noperm+0x12a/0x5e0 fs/xattr.c:216 __vfs_setxattr_locked+0x212/0x230 fs/xattr.c:277 vfs_setxattr+0x168/0x2f0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x2da/0x300 fs/xattr.c:611 path_setxattr+0x142/0x280 fs/xattr.c:630 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __x64_sys_lsetxattr+0xc2/0xe0 fs/xattr.c:649 x64_sys_call+0x8cc/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:190 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fa38e461929 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:00007fa38caca038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 00007fa38e688fa0 RCX: 00007fa38e461929 RDX: 0000200000000040 RSI: 0000200000000300 RDI: 0000200000000100 RBP: 00007fa38e4e3b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe37 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fa38e688fa0 R15: 00007ffd7b22f288 Allocated by task 20758: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] ____kasan_kmalloc mm/kasan/common.c:512 [inline] __kasan_kmalloc+0xda/0x110 mm/kasan/common.c:521 kasan_kmalloc include/linux/kasan.h:227 [inline] __kmalloc_track_caller+0x13c/0x2c0 mm/slub.c:4954 kmemdup+0x26/0x60 mm/util.c:132 ext4_xattr_block_set+0x7e2/0x2cb0 fs/ext4/xattr.c:1952 ext4_xattr_set_handle+0xba5/0x12b0 fs/ext4/xattr.c:2412 ext4_xattr_set+0x22a/0x320 fs/ext4/xattr.c:2522 ext4_xattr_trusted_set+0x3c/0x50 fs/ext4/xattr_trusted.c:38 __vfs_setxattr+0x3e1/0x430 fs/xattr.c:182 __vfs_setxattr_noperm+0x12a/0x5e0 fs/xattr.c:216 __vfs_setxattr_locked+0x212/0x230 fs/xattr.c:277 vfs_setxattr+0x168/0x2f0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x2da/0x300 fs/xattr.c:611 path_setxattr+0x142/0x280 fs/xattr.c:630 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __x64_sys_lsetxattr+0xc2/0xe0 fs/xattr.c:649 x64_sys_call+0x8cc/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:190 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu_common kernel/rcu/tree.c:3007 [inline] call_rcu+0xf6/0xf60 kernel/rcu/tree.c:3125 qdisc_destroy+0x166/0x270 net/sched/sch_generic.c:1032 qdisc_put net/sched/sch_generic.c:1044 [inline] shutdown_scheduler_queue net/sched/sch_generic.c:1097 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2411 [inline] dev_shutdown+0x198/0x580 net/sched/sch_generic.c:1405 unregister_netdevice_many+0x95d/0x1990 net/core/dev.c:11143 unregister_netdevice_queue+0x31c/0x360 net/core/dev.c:11083 unregister_netdevice include/linux/netdevice.h:3057 [inline] __tun_detach+0xca6/0x1450 drivers/net/tun.c:686 tun_detach drivers/net/tun.c:702 [inline] tun_chr_close+0x92/0x140 drivers/net/tun.c:3440 __fput+0x20b/0x8b0 fs/file_table.c:311 ____fput+0x15/0x20 fs/file_table.c:339 task_work_run+0x127/0x190 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu_common kernel/rcu/tree.c:3007 [inline] call_rcu+0xf6/0xf60 kernel/rcu/tree.c:3125 qdisc_destroy+0x166/0x270 net/sched/sch_generic.c:1032 qdisc_put net/sched/sch_generic.c:1044 [inline] shutdown_scheduler_queue net/sched/sch_generic.c:1097 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2411 [inline] dev_shutdown+0x198/0x580 net/sched/sch_generic.c:1405 unregister_netdevice_many+0x95d/0x1990 net/core/dev.c:11143 unregister_netdevice_queue+0x31c/0x360 net/core/dev.c:11083 unregister_netdevice include/linux/netdevice.h:3057 [inline] __tun_detach+0xca6/0x1450 drivers/net/tun.c:686 tun_detach drivers/net/tun.c:702 [inline] tun_chr_close+0x92/0x140 drivers/net/tun.c:3440 __fput+0x20b/0x8b0 fs/file_table.c:311 ____fput+0x15/0x20 fs/file_table.c:339 task_work_run+0x127/0x190 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888112273000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 112 bytes inside of 1024-byte region [ffff888112273000, ffff888112273400) The buggy address belongs to the page: page:ffffea0004489c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x112270 head:ffffea0004489c00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100043080 raw: 0000000000000000 0000000080100010 00000001ffffffff 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 113, ts 4289657979, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5795 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1932 [inline] new_slab+0xa1/0x4d0 mm/slub.c:1995 ___slab_alloc+0x381/0x810 mm/slub.c:3028 __slab_alloc+0x49/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3250 [inline] __kmalloc_track_caller+0x169/0x2c0 mm/slub.c:4949 kmalloc_reserve net/core/skbuff.c:357 [inline] __alloc_skb+0x21a/0x740 net/core/skbuff.c:428 alloc_skb include/linux/skbuff.h:1183 [inline] alloc_uevent_skb+0x85/0x240 lib/kobject_uevent.c:290 uevent_net_broadcast_untagged lib/kobject_uevent.c:326 [inline] kobject_uevent_net_broadcast+0x335/0x5a0 lib/kobject_uevent.c:409 kobject_uevent_env+0x52e/0x700 lib/kobject_uevent.c:608 kobject_synth_uevent+0x520/0xaf0 lib/kobject_uevent.c:208 uevent_store+0x25/0x60 drivers/base/core.c:2438 dev_attr_store+0x5e/0x80 drivers/base/core.c:2136 sysfs_kf_write+0x129/0x150 fs/sysfs/file.c:139 page_owner free stack trace missing Memory state around the buggy address: ffff888112272f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888112272f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888112273000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888112273080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888112273100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================