================================================================== BUG: KASAN: use-after-free in memcmp lib/string.c:970 [inline] BUG: KASAN: use-after-free in bcmp+0x1e4/0x230 lib/string.c:991 Read of size 1 at addr ffff8881124be0a0 by task syz-executor311/303 CPU: 1 PID: 303 Comm: syz-executor311 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 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+0x10f/0x150 mm/kasan/report.c:444 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306 memcmp lib/string.c:970 [inline] bcmp+0x1e4/0x230 lib/string.c:991 ext4_xattr_value_same+0x147/0x1d0 fs/ext4/xattr.c:2267 ext4_xattr_set_handle+0x7d8/0x12b0 fs/ext4/xattr.c:2389 ext4_xattr_set+0x22e/0x310 fs/ext4/xattr.c:2512 ext4_xattr_security_set+0x3c/0x50 fs/ext4/xattr_security.c:31 __vfs_setxattr+0x3ef/0x440 fs/xattr.c:182 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216 __vfs_setxattr_locked+0x20e/0x230 fs/xattr.c:277 vfs_setxattr+0x167/0x2e0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x2cb/0x360 fs/xattr.c:611 path_setxattr+0x147/0x290 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:0x7f1a0412b539 Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 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 d8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffce496ef78 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 0000000000000040 RCX: 00007f1a0412b539 RDX: 0000200000000100 RSI: 0000200000000080 RDI: 0000200000000000 RBP: 0000200000000000 R08: 0000000000000000 R09: 6c616b7a79732f2e R10: 0000000000000001 R11: 0000000000000246 R12: 0000200000000080 R13: 0000200000000100 R14: 00007f1a041b7b60 R15: 0000000000000002 The buggy address belongs to the page: page:ffffea0004492f80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x1124be flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea00044924c8 ffffea0004492548 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), pid 274, ts 18114111427, free_ts 18153407856 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2610 prep_new_page+0x1c/0x110 mm/page_alloc.c:2616 get_page_from_freelist+0x2d42/0x2dd0 mm/page_alloc.c:4492 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5829 __alloc_pages_node include/linux/gfp.h:595 [inline] alloc_pages_node include/linux/gfp.h:609 [inline] alloc_pages include/linux/gfp.h:622 [inline] wp_page_copy+0x1e9/0x1890 mm/memory.c:3223 do_wp_page+0x9e1/0xc90 mm/memory.c:-1 handle_pte_fault+0x824/0x2770 mm/memory.c:4944 __handle_mm_fault mm/memory.c:-1 [inline] do_handle_mm_fault+0x1b3b/0x1e30 mm/memory.c:5345 handle_mm_fault include/linux/mm.h:1847 [inline] do_user_addr_fault+0x808/0x11c0 arch/x86/mm/fault.c:1416 handle_page_fault arch/x86/mm/fault.c:1507 [inline] exc_page_fault+0x51/0xb0 arch/x86/mm/fault.c:1560 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:606 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1477 [inline] free_pcp_prepare mm/page_alloc.c:1549 [inline] free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3540 free_unref_page_list+0x138/0x9e0 mm/page_alloc.c:3677 release_pages+0x1264/0x12c0 mm/swap.c:1033 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:320 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x17e/0x310 mm/mmu_gather.c:338 exit_mmap+0x43b/0x8b0 mm/mmap.c:3248 __mmput+0x92/0x300 kernel/fork.c:1191 mmput+0x50/0x150 kernel/fork.c:1214 exit_mm kernel/exit.c:561 [inline] do_exit+0xacc/0x29a0 kernel/exit.c:883 do_group_exit+0x149/0x310 kernel/exit.c:1010 __do_sys_exit_group kernel/exit.c:1021 [inline] __se_sys_exit_group kernel/exit.c:1019 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1019 x64_sys_call+0x832/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:232 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 Memory state around the buggy address: ffff8881124bdf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881124be000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881124be080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881124be100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881124be180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================