================================================================== BUG: KASAN: slab-out-of-bounds in neon_poly1305_do_update arch/arm64/crypto/poly1305-glue.c:107 [inline] BUG: KASAN: slab-out-of-bounds in neon_poly1305_update+0x2e0/0xb34 arch/arm64/crypto/poly1305-glue.c:119 Read of size 8 at addr ffff0000ffba5860 by task syz-executor.2/10026 CPU: 0 PID: 10026 Comm: syz-executor.2 Tainted: G W 6.10.0-rc2-syzkaller-g8867bbd4a056 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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+0x1f4c/0x2818 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:475 bch2_fs_recovery+0x31c4/0x5488 fs/bcachefs/recovery.c:803 bch2_fs_start+0x30c/0x53c fs/bcachefs/super.c:1031 bch2_fs_open+0x8b4/0xb64 fs/bcachefs/super.c:2123 bch2_mount+0x4fc/0xe18 fs/bcachefs/fs.c:1917 legacy_get_tree+0xd4/0x16c fs/fs_context.c:662 vfs_get_tree+0x90/0x288 fs/super.c:1780 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+0x45c/0x594 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:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 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 9905: 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] __do_kmalloc_node mm/slub.c:4121 [inline] __kmalloc_noprof+0x2a0/0x494 mm/slub.c:4134 kmalloc_noprof include/linux/slab.h:664 [inline] tomoyo_realpath_from_path+0xc8/0x4cc security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x1ec/0x414 security/tomoyo/file.c:771 tomoyo_file_open+0x15c/0x1ec security/tomoyo/tomoyo.c:334 security_file_open+0x70/0x664 security/security.c:2962 do_dentry_open+0x2d0/0x1330 fs/open.c:942 vfs_open+0x38/0x48 fs/open.c:1089 do_open fs/namei.c:3650 [inline] path_openat+0x1f98/0x285c fs/namei.c:3807 do_filp_open+0x1bc/0x3cc fs/namei.c:3834 do_sys_openat2+0x124/0x1b8 fs/open.c:1405 do_sys_open fs/open.c:1420 [inline] __do_sys_openat fs/open.c:1436 [inline] __se_sys_openat fs/open.c:1431 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1431 __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:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 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 9905: 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:2195 [inline] slab_free mm/slub.c:4436 [inline] kfree+0x15c/0x3f4 mm/slub.c:4557 tomoyo_realpath_from_path+0x484/0x4cc security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x1ec/0x414 security/tomoyo/file.c:771 tomoyo_file_open+0x15c/0x1ec security/tomoyo/tomoyo.c:334 security_file_open+0x70/0x664 security/security.c:2962 do_dentry_open+0x2d0/0x1330 fs/open.c:942 vfs_open+0x38/0x48 fs/open.c:1089 do_open fs/namei.c:3650 [inline] path_openat+0x1f98/0x285c fs/namei.c:3807 do_filp_open+0x1bc/0x3cc fs/namei.c:3834 do_sys_openat2+0x124/0x1b8 fs/open.c:1405 do_sys_open fs/open.c:1420 [inline] __do_sys_openat fs/open.c:1436 [inline] __se_sys_openat fs/open.c:1431 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1431 __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:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 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 ffff0000ffba4000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 2144 bytes to the right of allocated 4096-byte region [ffff0000ffba4000, ffff0000ffba5000) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13fba0 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 ffff0000c0002140 fffffdffc3ef4400 0000000000000002 raw: 0000000000000000 0000000000040004 00000001ffffefff 0000000000000000 head: 05ffc00000000040 ffff0000c0002140 fffffdffc3ef4400 0000000000000002 head: 0000000000000000 0000000000040004 00000001ffffefff 0000000000000000 head: 05ffc00000000003 fffffdffc3fee801 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000ffba5700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000ffba5780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000ffba5800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000ffba5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000ffba5900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== bcachefs (loop2): alloc_read... done bcachefs (loop2): stripes_read... done bcachefs (loop2): snapshots_read... done bcachefs (loop2): journal_replay... done bcachefs (loop2): resume_logged_ops... done bcachefs (loop2): going read-write bcachefs (loop2): bch2_copygc_start(): error creating copygc thread EINTR bcachefs (loop2): error starting copygc thread bcachefs (loop2): going read-only bcachefs (loop2): finished waiting for writes to stop bcachefs (loop2): flushing journal and stopping allocators, journal seq 10 bcachefs (loop2): flushing journal and stopping allocators complete, journal seq 10 bcachefs (loop2): shutdown complete, journal seq 11 bcachefs (loop2): marking filesystem clean bcachefs (loop2): bch2_fs_start(): error starting filesystem EINTR bcachefs (loop2): shutting down bcachefs (loop2): shutdown complete Unable to handle kernel paging request at virtual address 0020e7abc7b29661 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 [0020e7abc7b29661] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 10026 Comm: syz-executor.2 Tainted: G B W 6.10.0-rc2-syzkaller-g8867bbd4a056 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024