================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x92b/0x1ed0 fs/ext4/xattr.c:1763 Read of size 18446744073709551600 at addr ffff888013208d24 by task syz.0.0/5329 CPU: 0 UID: 0 PID: 5329 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200 __asan_memmove+0x29/0x70 mm/kasan/shadow.c:94 ext4_xattr_set_entry+0x92b/0x1ed0 fs/ext4/xattr.c:1763 ext4_xattr_ibody_set+0x262/0x710 fs/ext4/xattr.c:2275 ext4_destroy_inline_data_nolock+0x23a/0x5f0 fs/ext4/inline.c:472 ext4_convert_inline_data_nolock+0x208/0x980 fs/ext4/inline.c:1123 ext4_convert_inline_data+0x484/0x5c0 fs/ext4/inline.c:1994 ext4_page_mkwrite+0x244/0x1140 fs/ext4/inode.c:6809 do_page_mkwrite+0x147/0x310 mm/memory.c:3684 wp_page_shared mm/memory.c:4085 [inline] do_wp_page+0x1973/0x4c70 mm/memory.c:4304 handle_pte_fault mm/memory.c:6395 [inline] __handle_mm_fault mm/memory.c:6517 [inline] handle_mm_fault+0x1490/0x3080 mm/memory.c:6686 do_user_addr_fault+0xa4d/0x1340 arch/x86/mm/fault.c:1343 handle_page_fault arch/x86/mm/fault.c:1483 [inline] exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1536 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 RIP: 0033:0x7fb8e0a67662 Code: 30 48 8b 14 24 48 85 d2 74 17 8b 44 24 10 0f c8 89 c0 48 89 44 24 10 48 83 fa 01 0f 85 aa 02 00 00 48 8b 44 24 18 8b 74 24 10 <89> 30 e9 1e fe ff ff 48 8b 44 24 18 8b 10 48 8b 04 24 48 85 c0 0f RSP: 002b:00007fff496652f0 EFLAGS: 00010246 RAX: 00002000000006c0 RBX: 0000000000000004 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000055558be09418 RBP: 00007fff49665410 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 00007fff49665450 R13: 00007fb8e0e2609c R14: 00000000000168e1 R15: 00007fb8e0e26090 The buggy address belongs to the physical page: page: refcount:2 mapcount:0 mapping:ffff88801d02d940 index:0x5 pfn:0x13208 memcg:ffff888040250300 aops:def_blk_aops ino:700000 dentry name(?):"" flags: 0xfff58000004234(referenced|dirty|lru|workingset|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff58000004234 ffffea000048cf88 ffffea0000498588 ffff88801d02d940 raw: 0000000000000005 ffff888042fadee0 00000002ffffffff ffff888040250300 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x148c48(GFP_NOFS|__GFP_MOVABLE|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL), pid 5329, tgid 5329 (syz.0.0), ts 93050190936, free_ts 93045381238 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304 alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490 alloc_frozen_pages_noprof mm/mempolicy.c:2561 [inline] alloc_pages_noprof+0xac/0x2a0 mm/mempolicy.c:2581 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2591 filemap_alloc_folio_noprof+0x111/0x470 mm/filemap.c:1013 __filemap_get_folio_mpol+0x402/0x1000 mm/filemap.c:2012 __filemap_get_folio include/linux/pagemap.h:761 [inline] grow_dev_folio fs/buffer.c:960 [inline] grow_buffers fs/buffer.c:1026 [inline] __getblk_slow fs/buffer.c:1044 [inline] bdev_getblk+0x1f4/0x6e0 fs/buffer.c:1439 __getblk include/linux/buffer_head.h:382 [inline] sb_getblk include/linux/buffer_head.h:388 [inline] __ext4_get_inode_loc+0x56c/0xf40 fs/ext4/inode.c:4891 ext4_get_inode_loc fs/ext4/inode.c:5019 [inline] ext4_reserve_inode_write+0x18b/0x360 fs/ext4/inode.c:6424 __ext4_mark_inode_dirty+0x13e/0x700 fs/ext4/inode.c:6602 ext4_dirty_inode+0xd0/0x110 fs/ext4/inode.c:6639 __mark_inode_dirty+0x3a8/0x13b0 fs/fs-writeback.c:2709 generic_update_time fs/inode.c:2257 [inline] file_update_time_flags+0x3ee/0x4a0 fs/inode.c:2487 ext4_page_mkwrite+0x224/0x1140 fs/ext4/inode.c:6805 page last free pid 5331 tgid 5329 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] free_unref_folios+0xd84/0x14a0 mm/page_alloc.c:3011 folios_put_refs+0x9e9/0xb30 mm/swap.c:1057 free_pages_and_swap_cache+0x41e/0x490 mm/swap_state.c:589 __tlb_batch_free_encoded_pages mm/mmu_gather.c:138 [inline] tlb_batch_pages_flush mm/mmu_gather.c:151 [inline] tlb_flush_mmu_free mm/mmu_gather.c:417 [inline] tlb_flush_mmu+0x6d3/0xa30 mm/mmu_gather.c:424 tlb_finish_mmu+0xf4/0x220 mm/mmu_gather.c:549 unmap_region+0x2a5/0x330 mm/vma.c:491 vms_clear_ptes mm/vma.c:1303 [inline] vms_clean_up_area mm/vma.c:1315 [inline] __mmap_setup mm/vma.c:2476 [inline] __mmap_region mm/vma.c:2756 [inline] mmap_region+0xc62/0x2310 mm/vma.c:2860 do_mmap+0xc3b/0x10c0 mm/mmap.c:560 vm_mmap_pgoff+0x272/0x4e0 mm/util.c:581 ksys_mmap_pgoff+0x4dc/0x760 mm/mmap.c:606 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888013208c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888013208c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888013208d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888013208d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888013208e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================