EXT4-fs error (device loop0): ext4_dirty_inode:6039: inode #15: comm syz.0.613: mark_inode_dirty error ================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x1390/0x3d30 fs/ext4/xattr.c:1747 Read of size 18446744073709551576 at addr ffff8880553f02d0 by task syz.0.613/7827 CPU: 0 PID: 7827 Comm: syz.0.613 Not tainted 5.15.185-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189 memmove+0x25/0x60 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0x1390/0x3d30 fs/ext4/xattr.c:1747 ext4_xattr_ibody_set+0x112/0x330 fs/ext4/xattr.c:2252 ext4_xattr_move_to_block fs/ext4/xattr.c:2639 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2707 [inline] ext4_expand_extra_isize_ea+0xf9a/0x19a0 fs/ext4/xattr.c:2799 __ext4_expand_extra_isize+0x301/0x3e0 fs/ext4/inode.c:5886 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5929 [inline] __ext4_mark_inode_dirty+0x469/0x700 fs/ext4/inode.c:6007 ext4_setattr+0x13b7/0x19e0 fs/ext4/inode.c:5548 notify_change+0xbcd/0xee0 fs/attr.c:505 do_truncate+0x197/0x220 fs/open.c:65 handle_truncate fs/namei.c:3265 [inline] do_open fs/namei.c:3612 [inline] path_openat+0x28af/0x2f30 fs/namei.c:3742 do_filp_open+0x1b3/0x3e0 fs/namei.c:3769 do_sys_openat2+0x142/0x4a0 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_creat fs/open.c:1345 [inline] __se_sys_creat fs/open.c:1339 [inline] __x64_sys_creat+0x8c/0xb0 fs/open.c:1339 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:0x7f4e84a2b929 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:00007f4e82893038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f4e84c52fa0 RCX: 00007f4e84a2b929 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 00002000000000c0 RBP: 00007f4e84aadb39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4e84c52fa0 R15: 00007ffe1bc26158 The buggy address belongs to the page: page:ffffea000154fc00 refcount:2 mapcount:0 mapping:ffff8881408d4f30 index:0x2 pfn:0x553f0 memcg:ffff88805e404000 aops:def_blk_aops ino:700000 flags: 0xfff00000002036(referenced|uptodate|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002036 ffffea000144cc08 ffffea0001d44ac8 ffff8881408d4f30 raw: 0000000000000002 ffff88805daea1d0 00000002ffffffff ffff88805e404000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x108c40(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL), pid 7827, ts 246373399405, free_ts 244635374877 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474 __page_cache_alloc+0xd2/0x3f0 mm/filemap.c:1022 pagecache_get_page+0x986/0xef0 mm/filemap.c:1940 find_or_create_page include/linux/pagemap.h:420 [inline] grow_dev_page fs/buffer.c:949 [inline] grow_buffers fs/buffer.c:1014 [inline] __getblk_slow fs/buffer.c:1041 [inline] __getblk_gfp+0x249/0xb70 fs/buffer.c:1336 sb_getblk_gfp include/linux/buffer_head.h:368 [inline] ext4_sb_breadahead_unmovable+0x68/0xe0 fs/ext4/super.c:239 __ext4_get_inode_loc+0x97b/0xcd0 fs/ext4/inode.c:4404 __ext4_get_inode_loc_noinmem fs/ext4/inode.c:4434 [inline] __ext4_iget+0x447/0x3cc0 fs/ext4/inode.c:4684 ext4_fill_super+0x77d5/0x9a00 fs/ext4/super.c:4841 mount_bdev+0x287/0x3c0 fs/super.c:1400 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x24a/0xa40 fs/namespace.c:3010 do_mount fs/namespace.c:3353 [inline] __do_sys_mount fs/namespace.c:3561 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3538 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 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x94/0x280 mm/page_alloc.c:3396 genradix_free_recurse+0x5d/0xa0 lib/generic-radix-tree.c:213 sctp_stream_free+0xcb/0x100 net/sctp/stream.c:191 sctp_association_free+0x269/0x7e0 net/sctp/associola.c:353 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:944 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1331 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x36a4/0x5500 net/sctp/sm_sideeffect.c:1170 sctp_primitive_ABORT+0x94/0xc0 net/sctp/primitive.c:104 sctp_close+0x2d3/0x8f0 net/sctp/socket.c:1524 inet_release+0x17c/0x1f0 net/ipv4/af_inet.c:432 __sock_release net/socket.c:649 [inline] sock_close+0xd5/0x240 net/socket.c:1336 __fput+0x234/0x930 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 Memory state around the buggy address: ffff8880553f0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880553f0200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880553f0280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8880553f0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880553f0380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================