bcachefs (loop8): key in missing inode, found keys:
u64s 7 type extent 536870913:24:U32_MAX len 24 ver 0: durability: 1 crc: c_size 8 size 24 offset 0 nonce 0 csum none 0:0 compress lz4 ptr: 0:34:8 gen 0
, fixing
==================================================================
BUG: KASAN: use-after-free in check_extent_overbig.constprop.0+0x557/0x5b0 fs/bcachefs/fsck.c:1848
Read of size 8 at addr ffff8880918a0188 by task syz.8.539/8151
CPU: 1 UID: 0 PID: 8151 Comm: syz.8.539 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
check_extent_overbig.constprop.0+0x557/0x5b0 fs/bcachefs/fsck.c:1848
bch2_check_extents+0xeee/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f066b99038a
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:00007f0669bf5e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f0669bf5ef0 RCX: 00007f066b99038a
RDX: 0000200000000080 RSI: 0000200000000040 RDI: 00007f0669bf5eb0
RBP: 0000200000000080 R08: 00007f0669bf5ef0 R09: 0000000000800000
R10: 0000000000800000 R11: 0000000000000246 R12: 0000200000000040
R13: 00007f0669bf5eb0 R14: 0000000000005980 R15: 0000200000006780
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x918a0
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffff88813fffbf08 ffffea00023fc808 0000000000000000
raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 5, migratetype Unmovable, gfp_mask 0x42800(GFP_NOWAIT|__GFP_COMP), pid 8151, tgid 8150 (syz.8.539), ts 265254485789, free_ts 269376514590
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
___kmalloc_large_node+0xed/0x160 mm/slub.c:4306
__kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:4337
__do_kmalloc_node mm/slub.c:4353 [inline]
__kvmalloc_node_noprof.cold+0xb/0x65 mm/slub.c:5052
btree_bounce_alloc+0x115/0x200 fs/bcachefs/btree_io.c:127
bch2_btree_node_read_done+0x10d6/0x4e50 fs/bcachefs/btree_io.c:1278
btree_node_read_work+0x2c9/0xe00 fs/bcachefs/btree_io.c:1440
bch2_btree_node_read+0x891/0xe20 fs/bcachefs/btree_io.c:1865
__bch2_btree_root_read fs/bcachefs/btree_io.c:1906 [inline]
bch2_btree_root_read+0x2d1/0x480 fs/bcachefs/btree_io.c:1928
read_btree_roots fs/bcachefs/recovery.c:615 [inline]
bch2_fs_recovery+0x2271/0x48a0 fs/bcachefs/recovery.c:1006
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
page last free pid 8151 tgid 8150 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_pages_ok+0x720/0xfc0 mm/page_alloc.c:1571
btree_bounce_free fs/bcachefs/btree_io.c:115 [inline]
btree_node_sort+0x101c/0x1560 fs/bcachefs/btree_io.c:383
bch2_btree_post_write_cleanup fs/bcachefs/btree_io.c:2607 [inline]
bch2_btree_post_write_cleanup+0x14b/0x860 fs/bcachefs/btree_io.c:2581
bch2_btree_node_prep_for_write+0x354/0x550 fs/bcachefs/btree_trans_commit.c:95
bch2_trans_lock_write+0x695/0x8c0 fs/bcachefs/btree_trans_commit.c:131
do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:850 [inline]
__bch2_trans_commit+0x280d/0x8560 fs/bcachefs/btree_trans_commit.c:1085
bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline]
check_extent fs/bcachefs/fsck.c:1938 [inline]
bch2_check_extents+0xe2d/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
Memory state around the buggy address:
ffff8880918a0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880918a0180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880918a0200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
==================================================================
BUG: KASAN: use-after-free in bch2_extent_crc_unpack.part.0+0x50b/0x590 fs/bcachefs/extents.h:168
Read of size 8 at addr ffff8880918a0188 by task syz.8.539/8151
CPU: 0 UID: 0 PID: 8151 Comm: syz.8.539 Tainted: G B syzkaller #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
bch2_extent_crc_unpack.part.0+0x50b/0x590 fs/bcachefs/extents.h:168
bch2_extent_crc_unpack fs/bcachefs/extents.h:161 [inline]
check_extent_overbig.constprop.0+0x207/0x5b0 fs/bcachefs/fsck.c:1848
bch2_check_extents+0xeee/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f066b99038a
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:00007f0669bf5e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f0669bf5ef0 RCX: 00007f066b99038a
RDX: 0000200000000080 RSI: 0000200000000040 RDI: 00007f0669bf5eb0
RBP: 0000200000000080 R08: 00007f0669bf5ef0 R09: 0000000000800000
R10: 0000000000800000 R11: 0000000000000246 R12: 0000200000000040
R13: 00007f0669bf5eb0 R14: 0000000000005980 R15: 0000200000006780
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x918a0
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffff88813fffbf08 ffffea00023fc808 0000000000000000
raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 5, migratetype Unmovable, gfp_mask 0x42800(GFP_NOWAIT|__GFP_COMP), pid 8151, tgid 8150 (syz.8.539), ts 265254485789, free_ts 269376514590
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
___kmalloc_large_node+0xed/0x160 mm/slub.c:4306
__kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:4337
__do_kmalloc_node mm/slub.c:4353 [inline]
__kvmalloc_node_noprof.cold+0xb/0x65 mm/slub.c:5052
btree_bounce_alloc+0x115/0x200 fs/bcachefs/btree_io.c:127
bch2_btree_node_read_done+0x10d6/0x4e50 fs/bcachefs/btree_io.c:1278
btree_node_read_work+0x2c9/0xe00 fs/bcachefs/btree_io.c:1440
bch2_btree_node_read+0x891/0xe20 fs/bcachefs/btree_io.c:1865
__bch2_btree_root_read fs/bcachefs/btree_io.c:1906 [inline]
bch2_btree_root_read+0x2d1/0x480 fs/bcachefs/btree_io.c:1928
read_btree_roots fs/bcachefs/recovery.c:615 [inline]
bch2_fs_recovery+0x2271/0x48a0 fs/bcachefs/recovery.c:1006
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
page last free pid 8151 tgid 8150 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_pages_ok+0x720/0xfc0 mm/page_alloc.c:1571
btree_bounce_free fs/bcachefs/btree_io.c:115 [inline]
btree_node_sort+0x101c/0x1560 fs/bcachefs/btree_io.c:383
bch2_btree_post_write_cleanup fs/bcachefs/btree_io.c:2607 [inline]
bch2_btree_post_write_cleanup+0x14b/0x860 fs/bcachefs/btree_io.c:2581
bch2_btree_node_prep_for_write+0x354/0x550 fs/bcachefs/btree_trans_commit.c:95
bch2_trans_lock_write+0x695/0x8c0 fs/bcachefs/btree_trans_commit.c:131
do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:850 [inline]
__bch2_trans_commit+0x280d/0x8560 fs/bcachefs/btree_trans_commit.c:1085
bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline]
check_extent fs/bcachefs/fsck.c:1938 [inline]
bch2_check_extents+0xe2d/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
Memory state around the buggy address:
ffff8880918a0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880918a0180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880918a0200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
==================================================================
BUG: KASAN: use-after-free in bch2_extent_crc_unpack.part.0+0x4ec/0x590 fs/bcachefs/extents.h:171
Read of size 4 at addr ffff8880918a0188 by task syz.8.539/8151
CPU: 1 UID: 0 PID: 8151 Comm: syz.8.539 Tainted: G B syzkaller #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
bch2_extent_crc_unpack.part.0+0x4ec/0x590 fs/bcachefs/extents.h:171
bch2_extent_crc_unpack fs/bcachefs/extents.h:161 [inline]
check_extent_overbig.constprop.0+0x207/0x5b0 fs/bcachefs/fsck.c:1848
bch2_check_extents+0xeee/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f066b99038a
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:00007f0669bf5e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f0669bf5ef0 RCX: 00007f066b99038a
RDX: 0000200000000080 RSI: 0000200000000040 RDI: 00007f0669bf5eb0
RBP: 0000200000000080 R08: 00007f0669bf5ef0 R09: 0000000000800000
R10: 0000000000800000 R11: 0000000000000246 R12: 0000200000000040
R13: 00007f0669bf5eb0 R14: 0000000000005980 R15: 0000200000006780
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x918a0
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffff88813fffbf08 ffffea00023fc808 0000000000000000
raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 5, migratetype Unmovable, gfp_mask 0x42800(GFP_NOWAIT|__GFP_COMP), pid 8151, tgid 8150 (syz.8.539), ts 265254485789, free_ts 269376514590
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
___kmalloc_large_node+0xed/0x160 mm/slub.c:4306
__kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:4337
__do_kmalloc_node mm/slub.c:4353 [inline]
__kvmalloc_node_noprof.cold+0xb/0x65 mm/slub.c:5052
btree_bounce_alloc+0x115/0x200 fs/bcachefs/btree_io.c:127
bch2_btree_node_read_done+0x10d6/0x4e50 fs/bcachefs/btree_io.c:1278
btree_node_read_work+0x2c9/0xe00 fs/bcachefs/btree_io.c:1440
bch2_btree_node_read+0x891/0xe20 fs/bcachefs/btree_io.c:1865
__bch2_btree_root_read fs/bcachefs/btree_io.c:1906 [inline]
bch2_btree_root_read+0x2d1/0x480 fs/bcachefs/btree_io.c:1928
read_btree_roots fs/bcachefs/recovery.c:615 [inline]
bch2_fs_recovery+0x2271/0x48a0 fs/bcachefs/recovery.c:1006
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
page last free pid 8151 tgid 8150 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_pages_ok+0x720/0xfc0 mm/page_alloc.c:1571
btree_bounce_free fs/bcachefs/btree_io.c:115 [inline]
btree_node_sort+0x101c/0x1560 fs/bcachefs/btree_io.c:383
bch2_btree_post_write_cleanup fs/bcachefs/btree_io.c:2607 [inline]
bch2_btree_post_write_cleanup+0x14b/0x860 fs/bcachefs/btree_io.c:2581
bch2_btree_node_prep_for_write+0x354/0x550 fs/bcachefs/btree_trans_commit.c:95
bch2_trans_lock_write+0x695/0x8c0 fs/bcachefs/btree_trans_commit.c:131
do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:850 [inline]
__bch2_trans_commit+0x280d/0x8560 fs/bcachefs/btree_trans_commit.c:1085
bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline]
check_extent fs/bcachefs/fsck.c:1938 [inline]
bch2_check_extents+0xe2d/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
Memory state around the buggy address:
ffff8880918a0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880918a0180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880918a0200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
==================================================================
BUG: KASAN: use-after-free in bch2_extent_crc_unpack.part.0+0x4c0/0x590 fs/bcachefs/extents.h:174
Read of size 4 at addr ffff8880918a018c by task syz.8.539/8151
CPU: 0 UID: 0 PID: 8151 Comm: syz.8.539 Tainted: G B syzkaller #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
bch2_extent_crc_unpack.part.0+0x4c0/0x590 fs/bcachefs/extents.h:174
bch2_extent_crc_unpack fs/bcachefs/extents.h:161 [inline]
check_extent_overbig.constprop.0+0x207/0x5b0 fs/bcachefs/fsck.c:1848
bch2_check_extents+0xeee/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f066b99038a
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:00007f0669bf5e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f0669bf5ef0 RCX: 00007f066b99038a
RDX: 0000200000000080 RSI: 0000200000000040 RDI: 00007f0669bf5eb0
RBP: 0000200000000080 R08: 00007f0669bf5ef0 R09: 0000000000800000
R10: 0000000000800000 R11: 0000000000000246 R12: 0000200000000040
R13: 00007f0669bf5eb0 R14: 0000000000005980 R15: 0000200000006780
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x918a0
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffff88813fffbf08 ffffea00023fc808 0000000000000000
raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 5, migratetype Unmovable, gfp_mask 0x42800(GFP_NOWAIT|__GFP_COMP), pid 8151, tgid 8150 (syz.8.539), ts 265254485789, free_ts 269376514590
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
___kmalloc_large_node+0xed/0x160 mm/slub.c:4306
__kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:4337
__do_kmalloc_node mm/slub.c:4353 [inline]
__kvmalloc_node_noprof.cold+0xb/0x65 mm/slub.c:5052
btree_bounce_alloc+0x115/0x200 fs/bcachefs/btree_io.c:127
bch2_btree_node_read_done+0x10d6/0x4e50 fs/bcachefs/btree_io.c:1278
btree_node_read_work+0x2c9/0xe00 fs/bcachefs/btree_io.c:1440
bch2_btree_node_read+0x891/0xe20 fs/bcachefs/btree_io.c:1865
__bch2_btree_root_read fs/bcachefs/btree_io.c:1906 [inline]
bch2_btree_root_read+0x2d1/0x480 fs/bcachefs/btree_io.c:1928
read_btree_roots fs/bcachefs/recovery.c:615 [inline]
bch2_fs_recovery+0x2271/0x48a0 fs/bcachefs/recovery.c:1006
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
page last free pid 8151 tgid 8150 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_pages_ok+0x720/0xfc0 mm/page_alloc.c:1571
btree_bounce_free fs/bcachefs/btree_io.c:115 [inline]
btree_node_sort+0x101c/0x1560 fs/bcachefs/btree_io.c:383
bch2_btree_post_write_cleanup fs/bcachefs/btree_io.c:2607 [inline]
bch2_btree_post_write_cleanup+0x14b/0x860 fs/bcachefs/btree_io.c:2581
bch2_btree_node_prep_for_write+0x354/0x550 fs/bcachefs/btree_trans_commit.c:95
bch2_trans_lock_write+0x695/0x8c0 fs/bcachefs/btree_trans_commit.c:131
do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:850 [inline]
__bch2_trans_commit+0x280d/0x8560 fs/bcachefs/btree_trans_commit.c:1085
bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline]
check_extent fs/bcachefs/fsck.c:1938 [inline]
bch2_check_extents+0xe2d/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
Memory state around the buggy address:
ffff8880918a0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880918a0180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880918a0200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
==================================================================
BUG: KASAN: use-after-free in check_extent_overbig.constprop.0+0x573/0x5b0 fs/bcachefs/fsck.c:1853
Read of size 8 at addr ffff8880918a0188 by task syz.8.539/8151
CPU: 1 UID: 0 PID: 8151 Comm: syz.8.539 Tainted: G B syzkaller #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
check_extent_overbig.constprop.0+0x573/0x5b0 fs/bcachefs/fsck.c:1853
bch2_check_extents+0xeee/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f066b99038a
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:00007f0669bf5e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f0669bf5ef0 RCX: 00007f066b99038a
RDX: 0000200000000080 RSI: 0000200000000040 RDI: 00007f0669bf5eb0
RBP: 0000200000000080 R08: 00007f0669bf5ef0 R09: 0000000000800000
R10: 0000000000800000 R11: 0000000000000246 R12: 0000200000000040
R13: 00007f0669bf5eb0 R14: 0000000000005980 R15: 0000200000006780
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x918a0
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffff88813fffbf08 ffffea00023fc808 0000000000000000
raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 5, migratetype Unmovable, gfp_mask 0x42800(GFP_NOWAIT|__GFP_COMP), pid 8151, tgid 8150 (syz.8.539), ts 265254485789, free_ts 269376514590
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
___kmalloc_large_node+0xed/0x160 mm/slub.c:4306
__kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:4337
__do_kmalloc_node mm/slub.c:4353 [inline]
__kvmalloc_node_noprof.cold+0xb/0x65 mm/slub.c:5052
btree_bounce_alloc+0x115/0x200 fs/bcachefs/btree_io.c:127
bch2_btree_node_read_done+0x10d6/0x4e50 fs/bcachefs/btree_io.c:1278
btree_node_read_work+0x2c9/0xe00 fs/bcachefs/btree_io.c:1440
bch2_btree_node_read+0x891/0xe20 fs/bcachefs/btree_io.c:1865
__bch2_btree_root_read fs/bcachefs/btree_io.c:1906 [inline]
bch2_btree_root_read+0x2d1/0x480 fs/bcachefs/btree_io.c:1928
read_btree_roots fs/bcachefs/recovery.c:615 [inline]
bch2_fs_recovery+0x2271/0x48a0 fs/bcachefs/recovery.c:1006
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
page last free pid 8151 tgid 8150 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_pages_ok+0x720/0xfc0 mm/page_alloc.c:1571
btree_bounce_free fs/bcachefs/btree_io.c:115 [inline]
btree_node_sort+0x101c/0x1560 fs/bcachefs/btree_io.c:383
bch2_btree_post_write_cleanup fs/bcachefs/btree_io.c:2607 [inline]
bch2_btree_post_write_cleanup+0x14b/0x860 fs/bcachefs/btree_io.c:2581
bch2_btree_node_prep_for_write+0x354/0x550 fs/bcachefs/btree_trans_commit.c:95
bch2_trans_lock_write+0x695/0x8c0 fs/bcachefs/btree_trans_commit.c:131
do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:850 [inline]
__bch2_trans_commit+0x280d/0x8560 fs/bcachefs/btree_trans_commit.c:1085
bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline]
check_extent fs/bcachefs/fsck.c:1938 [inline]
bch2_check_extents+0xe2d/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
Memory state around the buggy address:
ffff8880918a0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880918a0180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880918a0200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
==================================================================
BUG: KASAN: use-after-free in check_extent_overbig.constprop.0+0x557/0x5b0 fs/bcachefs/fsck.c:1848
Read of size 8 at addr ffff8880918a0190 by task syz.8.539/8151
CPU: 0 UID: 0 PID: 8151 Comm: syz.8.539 Tainted: G B syzkaller #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
check_extent_overbig.constprop.0+0x557/0x5b0 fs/bcachefs/fsck.c:1848
bch2_check_extents+0xeee/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f066b99038a
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:00007f0669bf5e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f0669bf5ef0 RCX: 00007f066b99038a
RDX: 0000200000000080 RSI: 0000200000000040 RDI: 00007f0669bf5eb0
RBP: 0000200000000080 R08: 00007f0669bf5ef0 R09: 0000000000800000
R10: 0000000000800000 R11: 0000000000000246 R12: 0000200000000040
R13: 00007f0669bf5eb0 R14: 0000000000005980 R15: 0000200000006780
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x918a0
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffff88813fffbf08 ffffea00023fc808 0000000000000000
raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 5, migratetype Unmovable, gfp_mask 0x42800(GFP_NOWAIT|__GFP_COMP), pid 8151, tgid 8150 (syz.8.539), ts 265254485789, free_ts 269376514590
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
___kmalloc_large_node+0xed/0x160 mm/slub.c:4306
__kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:4337
__do_kmalloc_node mm/slub.c:4353 [inline]
__kvmalloc_node_noprof.cold+0xb/0x65 mm/slub.c:5052
btree_bounce_alloc+0x115/0x200 fs/bcachefs/btree_io.c:127
bch2_btree_node_read_done+0x10d6/0x4e50 fs/bcachefs/btree_io.c:1278
btree_node_read_work+0x2c9/0xe00 fs/bcachefs/btree_io.c:1440
bch2_btree_node_read+0x891/0xe20 fs/bcachefs/btree_io.c:1865
__bch2_btree_root_read fs/bcachefs/btree_io.c:1906 [inline]
bch2_btree_root_read+0x2d1/0x480 fs/bcachefs/btree_io.c:1928
read_btree_roots fs/bcachefs/recovery.c:615 [inline]
bch2_fs_recovery+0x2271/0x48a0 fs/bcachefs/recovery.c:1006
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
page last free pid 8151 tgid 8150 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_pages_ok+0x720/0xfc0 mm/page_alloc.c:1571
btree_bounce_free fs/bcachefs/btree_io.c:115 [inline]
btree_node_sort+0x101c/0x1560 fs/bcachefs/btree_io.c:383
bch2_btree_post_write_cleanup fs/bcachefs/btree_io.c:2607 [inline]
bch2_btree_post_write_cleanup+0x14b/0x860 fs/bcachefs/btree_io.c:2581
bch2_btree_node_prep_for_write+0x354/0x550 fs/bcachefs/btree_trans_commit.c:95
bch2_trans_lock_write+0x695/0x8c0 fs/bcachefs/btree_trans_commit.c:131
do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:850 [inline]
__bch2_trans_commit+0x280d/0x8560 fs/bcachefs/btree_trans_commit.c:1085
bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline]
check_extent fs/bcachefs/fsck.c:1938 [inline]
bch2_check_extents+0xe2d/0x38b0 fs/bcachefs/fsck.c:1982
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x2d5/0x10d0 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x2d1/0x480 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2f55/0x48a0 fs/bcachefs/recovery.c:1016
bch2_fs_start+0xf82/0x1450 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xd9b/0x1b70 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8e/0x340 fs/super.c:1815
do_new_mount fs/namespace.c:3808 [inline]
path_mount+0x1513/0x2000 fs/namespace.c:4123
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount fs/namespace.c:4324 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
Memory state around the buggy address:
ffff8880918a0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880918a0180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880918a0200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880918a0280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
bcachefs (loop8): key in missing inode, found keys:
u64s 18 type inline_data 536870914:8:U32_MAX len 8 ver 0: datalen 104: 73797a6b616c6c657273797a6b616c6c657273797a6b616c6c657273797a6b61
, fixing
done
bcachefs (loop8): check_indirect_extents... done
bcachefs (loop8): check_dirents...
bcachefs (loop8): dirent points to missing inode:
u64s 7 type dirent 4096:1896155912177158345:U32_MAX len 0 ver 0: file3 -> 536870913 type reg, fixing
bcachefs (loop8): dirent points to missing inode:
u64s 7 type dirent 4096:2695648408715017799:U32_MAX len 0 ver 0: file2 -> 536870913 type reg, fixing
bcachefs (loop8): dirent points to missing inode:
u64s 7 type dirent 4096:4330382808765833931:U32_MAX len 0 ver 0: file1 -> 536870912 type reg, fixing
bcachefs (loop8): dirent points to missing inode:
u64s 8 type dirent 4096:9097378837824744618:U32_MAX len 0 ver 0: file.cold -> 536870914 type reg, fixing
bcachefs (loop8): dirent points to missing inode:
u64s 7 type dirent 4098:5675548428000973578:U32_MAX len 0 ver 0: file1 -> 4100 type lnk, fixing
bcachefs (loop8): dirent points to missing inode:
u64s 7 type dirent 4098:8977922886548783724:U32_MAX len 0 ver 0: file0 -> 4099 type reg, fixing
done
bcachefs (loop8): check_xattrs...
bcachefs (loop8): key in missing inode, found keys:
u64s 7 type xattr 536870912:3798421620223919902:U32_MAX len 0 ver 0: user.xattr2:xattr2
u64s 7 type xattr 536870912:9073845653939145521:U32_MAX len 0 ver 0: user.xattr1:xattr1
, fixing
bcachefs (loop8): key in missing inode, found keys:
u64s 7 type xattr 536870912:9073845653939145521:U32_MAX len 0 ver 0: user.xattr1:xattr1
, fixing
done
bcachefs (loop8): check_root... done
bcachefs (loop8): check_unreachable_inodes... done
bcachefs (loop8): check_subvolume_structure... done
bcachefs (loop8): check_directory_structure... done
bcachefs (loop8): check_nlinks... done
bcachefs (loop8): check_rebalance_work... done
bcachefs (loop8): resume_logged_ops... done
bcachefs (loop8): delete_dead_inodes... done
bcachefs (loop8): set_fs_needs_rebalance... done
bcachefs (loop8): done starting filesystem