EXT4-fs (loop4): mounted filesystem without journal. Quota mode: none. ================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0xa48/0x1f30 fs/ext4/xattr.c:1710 Read of size 18446744073709551552 at addr ffff88805b9a22e8 by task syz.4.361/7042 CPU: 0 PID: 7042 Comm: syz.4.361 Not tainted 6.1.114-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 kasan_check_range+0x27f/0x290 mm/kasan/generic.c:189 memmove+0x25/0x60 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0xa48/0x1f30 fs/ext4/xattr.c:1710 ext4_xattr_ibody_set+0x264/0x720 fs/ext4/xattr.c:2220 ext4_xattr_move_to_block fs/ext4/xattr.c:2623 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2691 [inline] ext4_expand_extra_isize_ea+0x1128/0x1bb0 fs/ext4/xattr.c:2783 __ext4_expand_extra_isize+0x2f7/0x3d0 fs/ext4/inode.c:5936 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5979 [inline] __ext4_mark_inode_dirty+0x54f/0x920 fs/ext4/inode.c:6057 ext4_dirty_inode+0xbf/0x100 fs/ext4/inode.c:6089 __mark_inode_dirty+0x331/0xf80 fs/fs-writeback.c:2433 generic_update_time fs/inode.c:1942 [inline] inode_update_time fs/inode.c:1955 [inline] touch_atime+0x3fa/0x680 fs/inode.c:2027 file_accessed include/linux/fs.h:2600 [inline] filemap_read+0x2ef3/0x31d0 mm/filemap.c:2835 __kernel_read+0x421/0x890 fs/read_write.c:428 integrity_kernel_read+0xac/0xf0 security/integrity/iint.c:228 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0xa57/0x1c00 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x559/0xc40 security/integrity/ima/ima_api.c:293 process_measurement+0x135c/0x21b0 security/integrity/ima/ima_main.c:351 ima_file_check+0xed/0x170 security/integrity/ima/ima_main.c:534 do_open fs/namei.c:3628 [inline] path_openat+0x2687/0x2e60 fs/namei.c:3783 do_filp_open+0x230/0x480 fs/namei.c:3810 do_sys_openat2+0x13b/0x4f0 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_openat fs/open.c:1350 [inline] __se_sys_openat fs/open.c:1345 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1345 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f871297e719 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:00007f8713795038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f8712b35f80 RCX: 00007f871297e719 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: ffffffffffffff9c RBP: 00007f87129f132e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f8712b35f80 R15: 00007ffd8933c6d8 The buggy address belongs to the physical page: page:ffffea00016e6880 refcount:2 mapcount:0 mapping:ffff888148c56af8 index:0x2 pfn:0x5b9a2 memcg:ffff8880759bc000 aops:def_blk_aops ino:700004 flags: 0xfff58000002056(referenced|uptodate|lru|workingset|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff58000002056 ffffea0001a24008 ffffea0001d33808 ffff888148c56af8 raw: 0000000000000002 ffff888055059bc8 00000002ffffffff ffff8880759bc000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x148c40(GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL), pid 7042, tgid 7039 (syz.4.361), ts 234782762326, free_ts 234775627728 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2517 prep_new_page mm/page_alloc.c:2524 [inline] get_page_from_freelist+0x322e/0x33b0 mm/page_alloc.c:4290 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5558 folio_alloc+0x1a/0x50 mm/mempolicy.c:2292 filemap_alloc_folio+0xda/0x4f0 mm/filemap.c:999 __filemap_get_folio+0x749/0xe80 mm/filemap.c:1993 pagecache_get_page+0x28/0x250 mm/folio-compat.c:110 find_or_create_page include/linux/pagemap.h:646 [inline] grow_dev_page fs/buffer.c:946 [inline] grow_buffers fs/buffer.c:1011 [inline] __getblk_slow fs/buffer.c:1038 [inline] __getblk_gfp+0x211/0xa20 fs/buffer.c:1333 sb_getblk_gfp include/linux/buffer_head.h:363 [inline] ext4_sb_breadahead_unmovable+0x63/0xe0 fs/ext4/super.c:257 __ext4_get_inode_loc+0xbbb/0xe40 fs/ext4/inode.c:4594 __ext4_get_inode_loc_noinmem fs/ext4/inode.c:4624 [inline] __ext4_iget+0x4ff/0x3ee0 fs/ext4/inode.c:4846 __ext4_fill_super fs/ext4/super.c:5400 [inline] ext4_fill_super+0x6cb9/0x8b50 fs/ext4/super.c:5665 get_tree_bdev+0x3fe/0x620 fs/super.c:1366 vfs_get_tree+0x88/0x270 fs/super.c:1573 do_new_mount+0x2ba/0xb40 fs/namespace.c:3056 do_mount fs/namespace.c:3399 [inline] __do_sys_mount fs/namespace.c:3607 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3584 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1444 [inline] free_pcp_prepare mm/page_alloc.c:1494 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3369 free_unref_page_list+0x663/0x900 mm/page_alloc.c:3510 release_pages+0x2836/0x2b40 mm/swap.c:1055 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu+0xfc/0x210 mm/mmu_gather.c:261 tlb_finish_mmu+0xce/0x1f0 mm/mmu_gather.c:361 exit_mmap+0x3c3/0x9f0 mm/mmap.c:3239 __mmput+0x115/0x3c0 kernel/fork.c:1199 exit_mm+0x226/0x300 kernel/exit.c:565 do_exit+0x9f6/0x26a0 kernel/exit.c:858 do_group_exit+0x202/0x2b0 kernel/exit.c:1021 __do_sys_exit_group kernel/exit.c:1032 [inline] __se_sys_exit_group kernel/exit.c:1030 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1030 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88805b9a2180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805b9a2200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805b9a2280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88805b9a2300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805b9a2380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================