loop1: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: use-after-free in dtMoveEntry fs/jfs/jfs_dtree.c:3934 [inline] BUG: KASAN: use-after-free in dtSplitPage+0x1e37/0x3b20 fs/jfs/jfs_dtree.c:1561 Write of size 1 at addr ffff88804d477000 by task syz.1.295/8717 CPU: 1 UID: 0 PID: 8717 Comm: syz.1.295 Not tainted 6.16.0-rc6-syzkaller-00281-gf4a40a4282f4 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x230 mm/kasan/report.c:480 kasan_report+0x118/0x150 mm/kasan/report.c:593 dtMoveEntry fs/jfs/jfs_dtree.c:3934 [inline] dtSplitPage+0x1e37/0x3b20 fs/jfs/jfs_dtree.c:1561 dtSplitUp fs/jfs/jfs_dtree.c:1092 [inline] dtInsert+0x109b/0x5f40 fs/jfs/jfs_dtree.c:871 jfs_create+0x6c8/0xa80 fs/jfs/namei.c:137 lookup_open fs/namei.c:3717 [inline] open_last_lookups fs/namei.c:3816 [inline] path_openat+0x14f1/0x3830 fs/namei.c:4052 do_filp_open+0x1fa/0x410 fs/namei.c:4082 do_sys_openat2+0x121/0x1c0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_creat fs/open.c:1530 [inline] __se_sys_creat fs/open.c:1524 [inline] __x64_sys_creat+0x8f/0xc0 fs/open.c:1524 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f993718e9a9 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:00007f9937f13038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f99373b5fa0 RCX: 00007f993718e9a9 RDX: 0000000000000000 RSI: 0000000000000032 RDI: 00002000000008c0 RBP: 00007f9937210d69 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f99373b5fa0 R15: 00007ffdbef56748 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x40 pfn:0x4d477 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea000115bb48 ffffea00011595c8 0000000000000000 raw: 0000000000000040 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 7476, tgid 7476 (udevd), ts 371566153724, free_ts 374207027495 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21d5/0x22b0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2510 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2520 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 ractl_alloc_folio mm/readahead.c:186 [inline] page_cache_ra_unbounded+0x2b9/0x7b0 mm/readahead.c:270 do_page_cache_ra mm/readahead.c:327 [inline] force_page_cache_ra mm/readahead.c:356 [inline] page_cache_sync_ra+0x3b9/0xae0 mm/readahead.c:575 filemap_get_pages+0x43c/0x1ea0 mm/filemap.c:2602 filemap_read+0x3f6/0x11a0 mm/filemap.c:2711 blkdev_read_iter+0x30a/0x440 block/fops.c:833 new_sync_read fs/read_write.c:491 [inline] vfs_read+0x4cd/0x980 fs/read_write.c:572 ksys_read+0x145/0x250 fs/read_write.c:715 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 7189 tgid 7189 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] free_unref_folios+0xcd2/0x1570 mm/page_alloc.c:2763 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] mapping_try_invalidate+0x324/0x410 mm/truncate.c:554 btrfs_close_bdev fs/btrfs/volumes.c:1117 [inline] btrfs_close_one_device fs/btrfs/volumes.c:1141 [inline] close_fs_devices+0x448/0x870 fs/btrfs/volumes.c:1184 btrfs_close_devices+0xc5/0x500 fs/btrfs/volumes.c:1199 close_ctree+0x843/0xd60 fs/btrfs/disk-io.c:4431 generic_shutdown_super+0x135/0x2c0 fs/super.c:643 kill_anon_super+0x3b/0x70 fs/super.c:1282 btrfs_kill_super+0x41/0x50 fs/btrfs/super.c:2095 deactivate_locked_super+0xb9/0x130 fs/super.c:474 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1417 task_work_run+0x1d4/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:114 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88804d476f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804d476f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804d477000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804d477080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804d477100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================