EXT4-fs error (device loop5): ext4_lookup:1789: inode #2: comm syz.5.3620: deleted inode referenced: 16 EXT4-fs error (device loop5): ext4_lookup:1789: inode #2: comm syz.5.3620: deleted inode referenced: 16 ================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x92b/0x1ed0 fs/ext4/xattr.c:1763 Read of size 18446744073709551600 at addr ffff88806685d2b8 by task syz.5.3620/20778 CPU: 0 UID: 0 PID: 20778 Comm: syz.5.3620 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 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_to_extent+0x549/0xde0 fs/ext4/inline.c:631 ext4_write_begin+0x349/0x1850 fs/ext4/inode.c:1315 ext4_da_write_begin+0x462/0xd50 fs/ext4/inode.c:3153 generic_perform_write+0x2d5/0x8f0 mm/filemap.c:4358 ext4_buffered_write_iter+0xcb/0x370 fs/ext4/file.c:316 ext4_file_write_iter+0x947/0x1c70 fs/ext4/file.c:-1 do_iter_readv_writev+0x612/0x8c0 fs/read_write.c:-1 vfs_writev+0x343/0x990 fs/read_write.c:1058 do_pwritev fs/read_write.c:1154 [inline] __do_sys_pwritev2 fs/read_write.c:1212 [inline] __se_sys_pwritev2+0x177/0x2a0 fs/read_write.c:1203 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 RIP: 0033:0x7f40ba39de59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f40bb247028 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007f40ba625fa0 RCX: 00007f40ba39de59 RDX: 0000000000000001 RSI: 0000200000000cc0 RDI: 0000000000000009 RBP: 00007f40ba433e6f R08: 000000000000000c R09: 0000000000000004 R10: 0000000000000fff R11: 0000000000000246 R12: 0000000000000000 R13: 00007f40ba626038 R14: 00007f40ba625fa0 R15: 00007ffecdc5ca58 The buggy address belongs to the physical page: page: refcount:2 mapcount:0 mapping:ffff8880239436c0 index:0x2 pfn:0x6685d memcg:ffff88807eb94f80 aops:def_blk_aops ino:700005 dentry name(?):"" flags: 0xfff58000004234(referenced|dirty|lru|workingset|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff58000004234 ffffea00013d1bc8 ffff88801daa33c0 ffff8880239436c0 raw: 0000000000000002 ffff88802a574540 00000002ffffffff ffff88807eb94f80 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 20778, tgid 20776 (syz.5.3620), ts 1498797102175, free_ts 1498523466512 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_noinmem fs/ext4/inode.c:5004 [inline] __ext4_iget+0x44e/0x45b0 fs/ext4/inode.c:5316 ext4_lookup+0x288/0x710 fs/ext4/namei.c:1785 lookup_one_qstr_excl+0x12d/0x360 fs/namei.c:1810 __start_dirop fs/namei.c:2920 [inline] start_dirop fs/namei.c:2942 [inline] filename_create+0x20e/0x370 fs/namei.c:4955 filename_mknodat+0x18c/0x660 fs/namei.c:5173 __do_sys_mknodat fs/namei.c:5216 [inline] __se_sys_mknodat+0x3b/0x150 fs/namei.c:5212 page last free pid 20838 tgid 20838 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 folio_batch_move_lru+0x877/0xa60 mm/swap.c:211 __folio_batch_add_and_move+0x510/0xc50 mm/swap.c:231 folio_add_lru_vma+0x196/0x210 mm/swap.c:581 wp_page_copy mm/memory.c:3943 [inline] do_wp_page+0x3d96/0x4c70 mm/memory.c:4336 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 Memory state around the buggy address: ffff88806685d180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806685d200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806685d280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88806685d300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806685d380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================