loop0: detected capacity change from 34816 to 0 ================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x92b/0x1ed0 fs/ext4/xattr.c:1767 Read of size 18446744073709551600 at addr ffff88805401eeb8 by task syz.0.0/5345 CPU: 0 UID: 0 PID: 5345 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:1767 ext4_xattr_ibody_set+0x262/0x710 fs/ext4/xattr.c:2277 ext4_destroy_inline_data_nolock+0x23a/0x5f0 fs/ext4/inline.c:471 ext4_destroy_inline_data+0x83/0xe0 fs/ext4/inline.c:1824 ext4_do_writepages+0x57f/0x44a0 fs/ext4/inode.c:2951 ext4_writepages+0x1fe/0x4e0 fs/ext4/inode.c:3166 do_writepages+0x338/0x560 mm/page-writeback.c:2562 filemap_writeback mm/filemap.c:386 [inline] filemap_flush_range mm/filemap.c:435 [inline] filemap_flush+0x1e1/0x2e0 mm/filemap.c:450 ext4_release_file+0x82/0x310 fs/ext4/file.c:171 __fput+0x408/0xa40 fs/file_table.c:512 fput_close_sync+0x11f/0x240 fs/file_table.c:618 filp_close_sync+0x6e/0xa0 fs/open.c:1574 __range_close fs/file.c:919 [inline] __do_sys_close_range fs/file.c:1003 [inline] __se_sys_close_range+0xa77/0xef0 fs/file.c:954 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ffac05a9559 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:00007ffac1552fe8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: ffffffffffffffda RBX: 00007ffac0825fa0 RCX: 00007ffac05a9559 RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000000 RBP: 00007ffac0638136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffac0826038 R14: 00007ffac0825fa0 R15: 00007ffc27644be8 The buggy address belongs to the physical page: page: refcount:2 mapcount:0 mapping:ffff88801e825940 index:0x2 pfn:0x5401e memcg:ffff88801e2d5680 aops:def_blk_aops ino:700000 dentry name(?):"" flags: 0x4fff3000000082c(referenced|uptodate|lru|owner_2|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff3000000082c ffffea000147ad48 ffffea00015006c8 ffff88801e825940 raw: 0000000000000002 ffff888014403ee0 00000002ffffffff ffff88801e2d5680 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5292, tgid 5292 (udevd), ts 86891608127 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1873 prep_new_page+0x22/0xb0 mm/page_alloc.c:1881 get_page_from_freelist+0x22a1/0x22e0 mm/page_alloc.c:3963 __alloc_frozen_pages_noprof+0x211/0x450 mm/page_alloc.c:5505 alloc_pages_mpol+0x21e/0x390 mm/mempolicy.c:2520 alloc_frozen_pages_noprof mm/mempolicy.c:2591 [inline] alloc_pages_noprof+0xb1/0x2b0 mm/mempolicy.c:2611 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2621 filemap_alloc_folio_noprof+0x111/0x460 mm/filemap.c:1017 ractl_alloc_folio mm/readahead.c:200 [inline] page_cache_ra_unbounded+0x390/0x9d0 mm/readahead.c:288 do_page_cache_ra mm/readahead.c:348 [inline] force_page_cache_ra+0x26c/0x2e0 mm/readahead.c:378 filemap_get_pages+0x48f/0x1ee0 mm/filemap.c:2743 filemap_read+0x421/0x11e0 mm/filemap.c:2853 blkdev_read_iter+0x3c6/0x590 block/fops.c:892 new_sync_read fs/read_write.c:473 [inline] vfs_read+0x595/0xa80 fs/read_write.c:554 ksys_read+0x150/0x270 fs/read_write.c:696 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 page last free pid 5345 tgid 5344 ts 86889085311 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1415 [inline] free_unref_folios+0xdcc/0x15d0 mm/page_alloc.c:3031 folios_put_refs+0x9e9/0xb30 mm/folio.c:1065 folio_batch_release include/linux/folio_batch.h:101 [inline] mapping_try_invalidate+0x3b7/0x4b0 mm/truncate.c:624 loop_set_status+0x25d/0xd50 drivers/block/loop.c:1162 loop_set_status_old drivers/block/loop.c:1278 [inline] lo_ioctl+0xc6b/0x1730 drivers/block/loop.c:1471 blkdev_ioctl+0x5e3/0x740 block/ioctl.c:798 vfs_ioctl fs/ioctl.c:52 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88805401ed80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805401ee00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805401ee80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88805401ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805401ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================