EXT4-fs (loop6): mounted filesystem without journal. Quota mode: none. ================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0xa87/0x1fa0 fs/ext4/xattr.c:1710 Read of size 18446744073709551552 at addr ffff8880537c32e8 by task syz.6.1119/9773 CPU: 1 PID: 9773 Comm: syz.6.1119 Not tainted 6.1.132-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 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:316 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:427 kasan_report+0x136/0x160 mm/kasan/report.c:531 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x27f/0x290 mm/kasan/generic.c:189 memmove+0x25/0x60 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0xa87/0x1fa0 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+0x1147/0x1c40 fs/ext4/xattr.c:2783 __ext4_expand_extra_isize+0x302/0x400 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:1946 [inline] inode_update_time fs/inode.c:1959 [inline] touch_atime+0x3fa/0x680 fs/inode.c:2031 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+0x163f/0x1d10 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x566/0xc90 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:0x7fab1078d169 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:00007fab115ae038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fab109a5fa0 RCX: 00007fab1078d169 RDX: 0000000000000042 RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007fab1080e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fab109a5fa0 R15: 00007ffcc6c127b8 The buggy address belongs to the physical page: page:ffffea00014df0c0 refcount:2 mapcount:0 mapping:ffff888018129df8 index:0x2 pfn:0x537c3 memcg:ffff888057142000 aops:def_blk_aops ino:700006 flags: 0xfff58000002056(referenced|uptodate|lru|workingset|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff58000002056 ffffea00013b1248 ffffea0001530b48 ffff888018129df8 raw: 0000000000000002 ffff888051271910 00000002ffffffff ffff888057142000 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 9773, tgid 9771 (syz.6.1119), ts 359034505620, free_ts 359031824331 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x3731/0x38d0 mm/page_alloc.c:4328 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5606 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:5390 [inline] ext4_fill_super+0x6d87/0x89e0 fs/ext4/super.c:5654 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:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x12a6/0x15b0 mm/page_alloc.c:3384 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3479 mm_free_pgd kernel/fork.c:742 [inline] __mmdrop+0xb2/0x470 kernel/fork.c:793 exit_mm+0x226/0x300 kernel/exit.c:565 do_exit+0x9f1/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: ffff8880537c3180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880537c3200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880537c3280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8880537c3300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880537c3380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================