KASAN: slab-out-of-bounds Read in md5_blocks

Status: upstream: reported C repro on 2026/10/01 23:29
Subsystems: ecryptfs
Labels: prio:normal
[Documentation on labels]
Reported-by: syzbot+46bbbe175b7eea8036b8@syzkaller.appspotmail.com
First crash: 50d, last: 2d21h
▶ ▼ ✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
8d8abdcf assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ KASAN: slab-out-of-bounds Read in md5_blocks 2026/09/29 03:25 2026/09/29 03:25 2026/09/29 04:15 58f15308
▶ ▼ Discussions (2)
Title Replies (including bot) Last reply
[PATCH v1] ecryptfs: validate key payload size and session key length 2 (2) 2026/10/13 05:26
[syzbot] [ecryptfs?] KASAN: slab-out-of-bounds Read in md5_blocks 0 (4) 2026/10/03 13:13
▶ ▼ Last patch testing requests (5)
Created Duration User Patch Repo Result
2026/11/11 09:09 1m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci error job log
2026/10/20 14:36 1h13m retest repro linux-next no crash job log log
2026/10/03 13:13 1h06m nsvatoslav515@gmail.com patch linux-next OK job log log
2026/10/03 13:05 1h08m nsvatoslav515@gmail.com patch linux-next OK job log log
2026/10/03 11:06 22m nsvatoslav515@gmail.com patch linux-next report job log log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in md5_block lib/crypto/md5.c:40 [inline]
BUG: KASAN: slab-out-of-bounds in md5_blocks+0x110/0xd3c lib/crypto/md5.c:126
Read of size 64 at addr ffff0000c191d2e0 by task syz.0.17/4948

CPU: 1 UID: 0 PID: 4948 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/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
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x17c/0x1ac mm/kasan/generic.c:200
 __asan_memcpy+0x3c/0x84 mm/kasan/shadow.c:105
 md5_block lib/crypto/md5.c:40 [inline]
 md5_blocks+0x110/0xd3c lib/crypto/md5.c:126
 md5_update+0xf4/0x158 lib/crypto/md5.c:161
 md5+0xd4/0x150 lib/crypto/md5.c:202
 ecryptfs_write_tag_70_packet+0x5d4/0xedc fs/ecryptfs/keystore.c:741
 ecryptfs_encrypt_filename fs/ecryptfs/crypto.c:1378 [inline]
 ecryptfs_encrypt_and_encode_filename+0x3e8/0x7ac fs/ecryptfs/crypto.c:1789
 ecryptfs_lookup+0x19c/0x694 fs/ecryptfs/inode.c:402
 __lookup_slow+0x1e4/0x2b4 fs/namei.c:1919
 lookup_slow+0x60/0x84 fs/namei.c:1936
 walk_component fs/namei.c:2311 [inline]
 lookup_last fs/namei.c:2818 [inline]
 path_lookupat+0x358/0x798 fs/namei.c:2842
 do_o_path+0xa4/0x1dc fs/namei.c:5000
 path_openat+0x12a8/0x18f0 fs/namei.c:5022
 do_file_open+0x1c8/0x2e8 fs/namei.c:5058
 do_sys_openat2+0x114/0x1e8 fs/open.c:1417
 do_sys_open+0xb0/0xe0 fs/open.c:1423
 __do_sys_openat fs/open.c:1439 [inline]
 __se_sys_openat fs/open.c:1434 [inline]
 __arm64_sys_openat+0xa8/0xc4 fs/open.c:1434
 __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+0x60/0x1d8 arch/arm64/kernel/entry-common.c:796
 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:815
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606

Allocated by task 49:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x40/0x78 mm/kasan/common.c:78
 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:570
 poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
 __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:426
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5414 [inline]
 __kmalloc_noprof+0x34c/0x6c8 mm/slub.c:5439
 _kmalloc_noprof include/linux/slab.h:995 [inline]
 _kzalloc_noprof include/linux/slab.h:1312 [inline]
 tomoyo_init_log+0x15ec/0x1a4c security/tomoyo/audit.c:273
 tomoyo_write_log2+0x37c/0x820 security/tomoyo/audit.c:374
 tomoyo_supervisor+0x164/0xf28 security/tomoyo/common.c:2208
 tomoyo_audit_mkdev_log security/tomoyo/file.c:200 [inline]
 tomoyo_mkdev_perm+0x300/0x4b4 security/tomoyo/file.c:890
 tomoyo_path_mknod+0xf0/0x18c security/tomoyo/tomoyo.c:242
 security_path_mknod+0x16c/0x340 security/security.c:1417
 filename_mknodat+0x284/0x5a0 fs/namei.c:5340
 init_mknod+0x38/0x5c fs/init.c:161
 do_name+0x200/0x314 init/initramfs.c:414
 write_buffer init/initramfs.c:479 [inline]
 unpack_to_rootfs+0x1b4/0x320 init/initramfs.c:545
 unpack_initramfs+0x50/0x114 init/initramfs.c:723
 do_populate_rootfs+0x74/0x254 init/initramfs.c:748
 async_run_entry_fn+0x9c/0x3ec kernel/async.c:129
 process_one_work kernel/workqueue.c:3396 [inline]
 process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3479
 worker_thread+0x798/0xbd0 kernel/workqueue.c:3560
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854

The buggy address belongs to the object at ffff0000c191d200
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 224 bytes inside of
 allocated 256-byte region [ffff0000c191d200, ffff0000c191d300)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10191c
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 05ffc00000000040 ffff0000c0001b40 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 05ffc00000000040 ffff0000c0001b40 dead000000000100 dead000000000122
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 05ffc00000000001 fffffdffc3064701 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000c191d200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff0000c191d280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff0000c191d300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff0000c191d380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff0000c191d400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/27 18:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7a19f0cc94ad 96923c60 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in md5_blocks
2026/11/13 00:14 upstream 9d66f26fefac d6166547 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-out-of-bounds Read in md5_blocks
2026/11/13 00:14 upstream 9d66f26fefac d6166547 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-out-of-bounds Read in md5_blocks
2026/11/14 23:49 upstream 97d73c825122 819ebe34 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Read in md5_blocks
2026/11/13 01:09 upstream 7e1392a42ea2 26b2fee0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Read in md5_blocks
2026/11/13 01:09 upstream 7e1392a42ea2 26b2fee0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Read in md5_blocks
2026/09/27 23:27 upstream d266640c6c76 a3c7249d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Read in md5_blocks
2026/09/27 23:27 upstream d266640c6c76 a3c7249d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Read in md5_blocks
2026/09/27 23:27 upstream d266640c6c76 a3c7249d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Read in md5_blocks
2026/09/27 23:27 upstream d266640c6c76 a3c7249d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-out-of-bounds Read in md5_blocks
2026/10/04 06:50 linux-next f0406245cb98 57bbd979 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-out-of-bounds Read in md5_blocks
2026/09/28 23:27 linux-next 6375e61c01e9 a3c7249d .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-out-of-bounds Read in md5_blocks
2026/09/28 22:22 linux-next 6375e61c01e9 a3c7249d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-out-of-bounds Read in md5_blocks
2026/10/28 06:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7a19f0cc94ad 96923c60 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in md5_blocks
2026/10/27 17:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7a19f0cc94ad 96923c60 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in md5_blocks
* Struck through repros no longer work on HEAD.