bcachefs (loop2): mounting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,promote_target=invalid device 127,journal_flush_delay=1311720,journal_reclaim_delay=1000,nocow bcachefs (loop2): recovering from clean shutdown, journal seq 10 ================================================================== BUG: KASAN: slab-use-after-free in neon_poly1305_do_update arch/arm64/crypto/poly1305-glue.c:107 [inline] BUG: KASAN: slab-use-after-free in neon_poly1305_update+0x2e0/0xb34 arch/arm64/crypto/poly1305-glue.c:119 Read of size 8 at addr ffff0000e752a1b0 by task syz.2.441/9341 CPU: 1 PID: 9341 Comm: syz.2.441 Not tainted 6.10.0-rc7-syzkaller-gc912bf709078 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 kasan_check_range+0x268/0x2a8 mm/kasan/generic.c:189 __asan_memcpy+0x3c/0x84 mm/kasan/shadow.c:105 neon_poly1305_do_update arch/arm64/crypto/poly1305-glue.c:107 [inline] neon_poly1305_update+0x2e0/0xb34 arch/arm64/crypto/poly1305-glue.c:119 crypto_shash_update+0x90/0xa8 crypto/shash.c:52 bch2_checksum+0x690/0x784 fs/bcachefs/checksum.c:229 bch2_btree_node_read_done+0xd7c/0x4ac8 fs/bcachefs/btree_io.c:1115 btree_node_read_work+0x50c/0xe04 fs/bcachefs/btree_io.c:1345 bch2_btree_node_read+0x1f50/0x280c fs/bcachefs/btree_io.c:1730 __bch2_btree_root_read fs/bcachefs/btree_io.c:1769 [inline] bch2_btree_root_read+0x2a8/0x534 fs/bcachefs/btree_io.c:1793 read_btree_roots+0x21c/0x730 fs/bcachefs/recovery.c:481 bch2_fs_recovery+0x31c8/0x5488 fs/bcachefs/recovery.c:809 bch2_fs_start+0x30c/0x53c fs/bcachefs/super.c:1035 bch2_fs_open+0x8b4/0xb64 fs/bcachefs/super.c:2132 bch2_mount+0x4fc/0xe68 fs/bcachefs/fs.c:1926 legacy_get_tree+0xd4/0x16c fs/fs_context.c:662 vfs_get_tree+0x90/0x288 fs/super.c:1789 do_new_mount+0x278/0x900 fs/namespace.c:3352 path_mount+0x590/0xe04 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __arm64_sys_mount+0x3c4/0x488 fs/namespace.c:3875 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:131 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:150 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Allocated by task 9217: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] kmalloc_trace_noprof+0x244/0x374 mm/slub.c:4154 kmalloc_noprof include/linux/slab.h:660 [inline] rtnl_newlink+0xe8/0x1bcc net/core/rtnetlink.c:3739 rtnetlink_rcv_msg+0x748/0xe64 net/core/rtnetlink.c:6635 netlink_rcv_skb+0x214/0x3c4 net/netlink/af_netlink.c:2564 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6653 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0x65c/0x898 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x7a0/0xa84 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x374/0x4f4 net/socket.c:2192 __do_sys_sendto net/socket.c:2204 [inline] __se_sys_sendto net/socket.c:2200 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2200 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:131 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:150 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Freed by task 9217: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:579 poison_slab_object+0x128/0x180 mm/kasan/common.c:240 __kasan_slab_free+0x3c/0x70 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2196 [inline] slab_free mm/slub.c:4438 [inline] kfree+0x154/0x3e0 mm/slub.c:4559 rtnl_newlink+0x1434/0x1bcc net/core/rtnetlink.c:3744 rtnetlink_rcv_msg+0x748/0xe64 net/core/rtnetlink.c:6635 netlink_rcv_skb+0x214/0x3c4 net/netlink/af_netlink.c:2564 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6653 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0x65c/0x898 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x7a0/0xa84 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x374/0x4f4 net/socket.c:2192 __do_sys_sendto net/socket.c:2204 [inline] __se_sys_sendto net/socket.c:2200 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2200 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:131 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:150 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 The buggy address belongs to the object at ffff0000e752a000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 432 bytes inside of freed 2048-byte region [ffff0000e752a000, ffff0000e752a800) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x127528 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 05ffc00000000040 ffff0000c0002000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000080008 00000001ffffefff 0000000000000000 head: 05ffc00000000040 ffff0000c0002000 dead000000000122 0000000000000000 head: 0000000000000000 0000000000080008 00000001ffffefff 0000000000000000 head: 05ffc00000000003 fffffdffc39d4a01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e752a080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e752a100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000e752a180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000e752a200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e752a280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== bcachefs (loop2): alloc_read... done bcachefs (loop2): stripes_read... done bcachefs (loop2): snapshots_read... done bcachefs (loop2): journal_replay... done bcachefs (loop2): initializing freespace bcachefs (loop2): bch2_dev_freespace_init(): error initializing free space erofs_trans_commit bcachefs (loop2): bch2_fs_freespace_init(): error erofs_trans_commit bcachefs (loop2): bch2_fs_recovery(): error erofs_trans_commit bcachefs (loop2): bch2_fs_start(): error starting filesystem erofs_trans_commit bcachefs (loop2): shutting down bcachefs (loop2): shutdown complete Unable to handle kernel paging request at virtual address 0033b9b104d1f570 Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [0033b9b104d1f570] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 9341 Comm: syz.2.441 Tainted: G B 6.10.0-rc7-syzkaller-gc912bf709078 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : qlist_move_cache mm/kasan/quarantine.c:302 [inline] pc : kasan_quarantine_remove_cache+0x2cc/0x430 mm/kasan/quarantine.c:370 lr : virt_to_phys arch/arm64/include/asm/memory.h:368 [inline] lr : virt_to_pfn arch/arm64/include/asm/memory.h:382 [inline] lr : virt_to_folio include/linux/mm.h:1318 [inline] lr : virt_to_slab mm/kasan/../slab.h:204 [inline] lr : qlink_to_cache mm/kasan/quarantine.c:131 [inline] lr : qlist_move_cache mm/kasan/quarantine.c:303 [inline] lr : kasan_quarantine_remove_cache+0x2e4/0x430 mm/kasan/quarantine.c:370 sp : ffff8000989b7090 x29: ffff8000989b70c0 x28: 00000000f0000000 x27: ffff800093a55b20 x26: ffff80008ea8e000 x25: 00000000f0001000 x24: fffffdffbf000000 x23: b533b9b104d1f570 x22: ffff800093a55b18 x21: ffff800093a55b10 x20: b533b9b104d1f570 x19: ffff0000d722c780 x18: ffff0001fea899d0 x17: 0000000000000000 x16: ffff800080346054 x15: ffff700013136df8 x14: 1ffff00013136df8 x13: 0000000000000004 x12: ffff0000d3b39e00 x11: ffff0000d6c42e68 x10: 000000000003fd40 x9 : ffff800093a55b20 x8 : fff1000040000000 x7 : 0000000000000000 x6 : ffff800080a4f108 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff80008034617c x2 : 0000000000000001 x1 : 0000000000000000 x0 : b533b9b104d1f570 Call trace: virt_to_phys arch/arm64/include/asm/memory.h:368 [inline] virt_to_pfn arch/arm64/include/asm/memory.h:382 [inline] virt_to_folio include/linux/mm.h:1318 [inline] virt_to_slab mm/kasan/../slab.h:204 [inline] qlink_to_cache mm/kasan/quarantine.c:131 [inline] qlist_move_cache mm/kasan/quarantine.c:303 [inline] kasan_quarantine_remove_cache+0x2cc/0x430 mm/kasan/quarantine.c:370 kasan_cache_shutdown+0x24/0x34 mm/kasan/generic.c:212 shutdown_cache mm/slab_common.c:454 [inline] kmem_cache_destroy+0x78/0x1b0 mm/slab_common.c:496 bio_put_slab block/bio.c:155 [inline] bioset_exit+0x330/0x434 block/bio.c:1740 bch2_fs_fs_io_direct_exit+0x24/0x40 fs/bcachefs/fs-io-direct.c:670 __bch2_fs_free fs/bcachefs/super.c:543 [inline] bch2_fs_release+0x18c/0x6b4 fs/bcachefs/super.c:604 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2a8/0x41c lib/kobject.c:737 bch2_fs_free+0x2c4/0x334 fs/bcachefs/super.c:668 bch2_fs_stop fs/bcachefs/super.c:674 [inline] bch2_fs_open+0x96c/0xb64 fs/bcachefs/super.c:2148 bch2_mount+0x4fc/0xe68 fs/bcachefs/fs.c:1926 legacy_get_tree+0xd4/0x16c fs/fs_context.c:662 vfs_get_tree+0x90/0x288 fs/super.c:1789 do_new_mount+0x278/0x900 fs/namespace.c:3352 path_mount+0x590/0xe04 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __arm64_sys_mount+0x3c4/0x488 fs/namespace.c:3875 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:131 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:150 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Code: f90002bf f9414f48 aa1403f7 aa1703e0 (f9400294) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: f90002bf str xzr, [x21] 4: f9414f48 ldr x8, [x26, #664] 8: aa1403f7 mov x23, x20 c: aa1703e0 mov x0, x23 * 10: f9400294 ldr x20, [x20] <-- trapping instruction