KASAN: use-after-free Read in register_bcache

Status: upstream: reported C repro on 2026/08/09 19:12
Subsystems: bcache ext4
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+cb5b32abe226710cdd8a@syzkaller.appspotmail.com
First crash: 1d07h, last: 8h15m
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
9c4331ce assessment-security DenialOfService: ✅ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ✅ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ✅ KASAN: use-after-free Read in register_bcache 2026/08/09 02:00 2026/08/09 02:00 2026/08/09 02:40 5d63f80b
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcache?] [ext4?] KASAN: use-after-free Read in register_bcache 0 (1) 2026/08/09 19:12

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in crc64_be_generic lib/crc/crc64-main.c:47 [inline]
BUG: KASAN: use-after-free in crc64_be+0xb8/0xe8 lib/crc/crc64-main.c:68
Read of size 1 at addr ffff0000dd543000 by task syz.0.33/4986

CPU: 1 UID: 0 PID: 4986 Comm: syz.0.33 Not tainted syzkaller #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/02/2026
Call trace:
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C)
 __dump_stack+0x30/0x40 lib/dump_stack.c:94
 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120
 print_address_description+0xb0/0x238 mm/kasan/report.c:378
 print_report+0x68/0x84 mm/kasan/report.c:482
 kasan_report+0x8c/0xc4 mm/kasan/report.c:595
 __asan_report_load1_noabort+0x20/0x2c mm/kasan/report_generic.c:378
 crc64_be_generic lib/crc/crc64-main.c:47 [inline]
 crc64_be+0xb8/0xe8 lib/crc/crc64-main.c:68
 bch_crc64 drivers/md/bcache/util.h:529 [inline]
 read_super drivers/md/bcache/super.c:208 [inline]
 register_bcache+0x9a4/0x13d8 drivers/md/bcache/super.c:2601
 kobj_attr_store+0x6c/0x90 lib/kobject.c:840
 sysfs_kf_write+0xe0/0x108 fs/sysfs/file.c:145
 kernfs_fop_write_iter+0x260/0x3b8 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x51c/0xa0c fs/read_write.c:687
 ksys_write+0x12c/0x228 fs/read_write.c:739
 __do_sys_write fs/read_write.c:750 [inline]
 __se_sys_write fs/read_write.c:747 [inline]
 __arm64_sys_write+0x84/0x98 fs/read_write.c:747
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121
 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140
 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:738
 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:757
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:590

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff0000dd543af0 pfn:0x11d543
flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000000 fffffdffc3754688 fffffdffc3755348 0000000000000000
raw: ffff0000dd543af0 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000dd542f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff0000dd542f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff0000dd543000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff0000dd543080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff0000dd543100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
bcache: register_bcache() error : Bad checksum

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/09 07:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ba5cc80fd326 5d63f80b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci-upstream-gce-arm64 KASAN: use-after-free Read in register_bcache
2026/08/09 02:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ba5cc80fd326 5d63f80b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci-upstream-gce-arm64 KASAN: use-after-free Read in register_bcache
2026/08/09 14:42 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ba5cc80fd326 5d63f80b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci-upstream-gce-arm64 KASAN: slab-use-after-free Read in register_bcache
2026/08/09 00:47 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ba5cc80fd326 5d63f80b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in register_bcache
2026/08/09 21:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ba5cc80fd326 5d63f80b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: use-after-free Read in register_bcache
2026/08/08 23:04 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ba5cc80fd326 5d63f80b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: use-after-free Read in register_bcache
2026/08/09 07:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ba5cc80fd326 5d63f80b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in register_bcache
2026/08/09 05:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ba5cc80fd326 5d63f80b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in register_bcache
2026/08/09 02:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ba5cc80fd326 5d63f80b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-use-after-free Read in register_bcache
* Struck through repros no longer work on HEAD.