Doing incompatible version upgrade from 0.32: (unknown version) to 1.10: disk_accounting_v3 running recovery passes: check_allocations,check_snapshots,check_subvols,check_inodes,check_dirents,set_fs_needs_rebalance ================================================================== BUG: KASAN: use-after-free in crypto_poly1305_update+0xd/0x20 arch/x86/crypto/poly1305_glue.c:230 Read of size 8 at addr ffff8881689e0070 by task syz.2.16/3338 CPU: 0 UID: 0 PID: 3338 Comm: syz.2.16 Not tainted 6.11.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0xf5/0x170 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0xca/0x250 mm/kasan/report.c:488 kasan_report+0x118/0x150 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 crypto_poly1305_update+0xd/0x20 arch/x86/crypto/poly1305_glue.c:230 bch2_checksum+0x2eb/0x4f0 fs/bcachefs/checksum.c:230 bch2_btree_node_read_done+0x13e9/0x4c80 fs/bcachefs/btree_io.c:1060 btree_node_read_work+0x507/0xcc0 fs/bcachefs/btree_io.c:1323 bch2_btree_node_read+0x1d4a/0x21e0 fs/bcachefs/btree_io.c:1708 __bch2_btree_root_read fs/bcachefs/btree_io.c:1749 [inline] bch2_btree_root_read+0x296/0x830 fs/bcachefs/btree_io.c:1773 read_btree_roots+0x30c/0x6d0 fs/bcachefs/recovery.c:516 bch2_fs_recovery+0x1640/0x27f0 fs/bcachefs/recovery.c:844 bch2_fs_start+0x2fa/0x4d0 fs/bcachefs/super.c:1036 bch2_fs_get_tree+0x467/0xf90 fs/bcachefs/fs.c:1946 vfs_get_tree+0x84/0x1a0 fs/super.c:1800 do_new_mount+0x1c9/0x850 fs/namespace.c:3472 do_mount fs/namespace.c:3812 [inline] __do_sys_mount fs/namespace.c:4020 [inline] __se_sys_mount+0x21c/0x2c0 fs/namespace.c:3997 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x8f/0x180 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff9217900ca Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007ff9225d1e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ff9225d1ef0 RCX: 00007ff9217900ca RDX: 000020000000f640 RSI: 000020000000f680 RDI: 00007ff9225d1eb0 RBP: 000020000000f640 R08: 00007ff9225d1ef0 R09: 0000000000000180 R10: 0000000000000180 R11: 0000000000000246 R12: 000020000000f680 R13: 00007ff9225d1eb0 R14: 000000000000f63b R15: 0000200000000080 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1689e0 flags: 0x100000000000000(node=0|zone=2) page_type: 0xbfffffff(buddy) raw: 0100000000000000 ffffea0005a28c08 ffffea0005c9f008 0000000000000000 raw: 0000000000000000 0000000000000004 00000000bfffffff 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 0x500cc2(GFP_HIGHUSER|__GFP_ACCOUNT), pid 2426, tgid 2426 (sshd-session), ts 60020722378, free_ts 60020866109 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x16e/0x1a0 mm/page_alloc.c:1493 prep_new_page mm/page_alloc.c:1501 [inline] get_page_from_freelist+0x29f2/0x2ac0 mm/page_alloc.c:3442 __alloc_pages_noprof+0x1e4/0x450 mm/page_alloc.c:4700 alloc_pages_mpol_noprof+0x1d5/0x380 mm/mempolicy.c:2263 pipe_write+0x519/0x1520 fs/pipe.c:513 new_sync_write fs/read_write.c:497 [inline] vfs_write+0x85d/0xb30 fs/read_write.c:590 ksys_write+0x100/0x1c0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x8f/0x180 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 2427 tgid 2427 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_page+0xbf1/0xca0 mm/page_alloc.c:2612 __folio_put+0x19b/0x280 mm/swap.c:128 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_update_tail fs/pipe.c:224 [inline] pipe_read+0x4e4/0xde0 fs/pipe.c:344 new_sync_read fs/read_write.c:395 [inline] vfs_read+0x6aa/0x8b0 fs/read_write.c:476 ksys_read+0x100/0x1c0 fs/read_write.c:619 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x8f/0x180 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff8881689dff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881689dff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881689e0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881689e0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881689e0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================