loop0: detected capacity change from 0 to 32768 bcachefs (loop0): mounting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,nojournal_transaction_names bcachefs (loop0): recovering from clean shutdown, journal seq 10 ================================================================== BUG: KASAN: slab-use-after-free in memcpy_dir crypto/scatterwalk.c:23 [inline] BUG: KASAN: slab-use-after-free in scatterwalk_copychunks+0x1cc/0x460 crypto/scatterwalk.c:38 Read of size 40 at addr ffff888061810000 by task syz-executor.0/6847 CPU: 1 PID: 6847 Comm: syz-executor.0 Not tainted 6.10.0-rc2-syzkaller-00022-g32f88d65f01b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 memcpy_dir crypto/scatterwalk.c:23 [inline] scatterwalk_copychunks+0x1cc/0x460 crypto/scatterwalk.c:38 skcipher_next_slow+0x39d/0x480 crypto/skcipher.c:276 skcipher_walk_next+0x634/0xba0 crypto/skcipher.c:361 chacha_simd_stream_xor+0x67f/0xd10 arch/x86/crypto/chacha_glue.c:192 do_encrypt_sg fs/bcachefs/checksum.c:108 [inline] do_encrypt+0x4ef/0x7d0 fs/bcachefs/checksum.c:128 bset_encrypt fs/bcachefs/btree_io.h:118 [inline] bch2_btree_node_read_done+0x185b/0x6750 fs/bcachefs/btree_io.c:1129 btree_node_read_work+0x68b/0x1260 fs/bcachefs/btree_io.c:1345