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

Status: upstream: reported on 2026/11/11 11:57
Reported-by: syzbot+834febd74e7ca3f097a9@syzkaller.appspotmail.com
First crash: 2d01h, last: 2d01h
▶ ▼ Similar bugs (2)
Kernel Title Rank πŸ›ˆ Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in ecryptfs_verify_auth_tok_from_key prio:high ecryptfs 17 syz, C 136 18h12m 57d 2/29 upstream: reported C repro on 2026/09/16 15:53
linux-6.1 KASAN: slab-out-of-bounds Read in ecryptfs_verify_auth_tok_from_key 17 syz, C error 3 57d 57d 0/3 upstream: reported C repro on 2026/09/17 10:18

Sample crash report:
ecryptfs_parse_options: eCryptfs: unrecognized option [ecry/²αΊ_cipher=aes]
==================================================================
BUG: KASAN: slab-out-of-bounds in ecryptfs_verify_auth_tok_from_key+0x34b/0x390 fs/ecryptfs/keystore.c:466
Read of size 2 at addr ffff888026151ed9 by task syz.2.6502/20086

CPU: 0 PID: 20086 Comm: syz.2.6502 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:364 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:468
 kasan_report+0x117/0x150 mm/kasan/report.c:581
 ecryptfs_verify_auth_tok_from_key+0x34b/0x390 fs/ecryptfs/keystore.c:466
 ecryptfs_keyring_auth_tok_for_sig+0xec/0x250 fs/ecryptfs/keystore.c:1645
 ecryptfs_init_global_auth_toks fs/ecryptfs/main.c:194 [inline]
 ecryptfs_parse_options fs/ecryptfs/main.c:458 [inline]
 ecryptfs_mount+0xc75/0x1970 fs/ecryptfs/main.c:501
 legacy_get_tree+0xea/0x180 fs/fs_context.c:662
 vfs_get_tree+0x8c/0x280 fs/super.c:1775
 do_new_mount+0x24a/0xa60 fs/namespace.c:3412
 do_mount fs/namespace.c:3780 [inline]
 __do_sys_mount fs/namespace.c:3989 [inline]
 __se_sys_mount+0x2e7/0x3d0 fs/namespace.c:3966
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fdaeaba8f19
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdaebab9028 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fdaeae25fa0 RCX: 00007fdaeaba8f19
RDX: 00002000000004c0 RSI: 0000200000000000 RDI: 0000200000000480
RBP: 00007fdaeac37f6d R08: 0000200000000500 R09: 0000000000000000
R10: 0000000002208054 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fdaeae26038 R14: 00007fdaeae25fa0 R15: 00007ffdfa0fe2c8
 </TASK>

Allocated by task 11280:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
 ____kasan_kmalloc mm/kasan/common.c:375 [inline]
 __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
 kasan_kmalloc include/linux/kasan.h:198 [inline]
 __do_kmalloc_node mm/slab_common.c:1007 [inline]
 __kmalloc+0xb7/0x240 mm/slab_common.c:1020
 kmalloc include/linux/slab.h:604 [inline]
 user_preparse+0x9e/0x160 security/keys/user_defined.c:67
 __key_create_or_update+0x362/0xa80 security/keys/key.c:846
 key_create_or_update+0x42/0x60 security/keys/key.c:1014
 __do_sys_add_key security/keys/keyctl.c:134 [inline]
 __se_sys_add_key+0x34f/0x410 security/keys/keyctl.c:74
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff888026151ec0
 which belongs to the cache kmalloc-32 of size 32
The buggy address is located 0 bytes to the right of
 allocated 25-byte region [ffff888026151ec0, ffff888026151ed9)

The buggy address belongs to the physical page:
page:ffffea0000985440 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26151
anon flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000800 ffff888018c41500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000400040 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 5786, tgid 5786 (syz-executor), ts 91084751863, free_ts 91061324741
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582
 prep_new_page mm/page_alloc.c:1589 [inline]
 get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221
 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501
 alloc_slab_page+0x5d/0x180 mm/slub.c:1903
 allocate_slab mm/slub.c:2050 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:2103
 ___slab_alloc+0xc5c/0x12f0 mm/slub.c:3275
 __slab_alloc mm/slub.c:3361 [inline]
 __slab_alloc_node mm/slub.c:3414 [inline]
 slab_alloc_node mm/slub.c:3508 [inline]
 __kmem_cache_alloc_node+0x122/0x260 mm/slub.c:3557
 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1098
 kmalloc include/linux/slab.h:600 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 rfkill_fop_open+0x190/0x580 net/rfkill/core.c:1203
 misc_open+0x326/0x3a0 drivers/char/misc.c:163
 chrdev_open+0x58c/0x600 fs/char_dev.c:414
 do_dentry_open+0x880/0x14b0 fs/open.c:929
 do_open fs/namei.c:3695 [inline]
 path_openat+0x284f/0x3270 fs/namei.c:3856
 do_filp_open+0x1f2/0x430 fs/namei.c:3883
 do_sys_openat2+0x134/0x1d0 fs/open.c:1422
 do_sys_open fs/open.c:1437 [inline]
 __do_sys_openat fs/open.c:1453 [inline]
 __se_sys_openat fs/open.c:1448 [inline]
 __x64_sys_openat+0x139/0x160 fs/open.c:1448
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1182 [inline]
 free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366
 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2459
 discard_slab mm/slub.c:2149 [inline]
 __unfreeze_partials+0x1cf/0x210 mm/slub.c:2689
 put_cpu_partial+0x17c/0x250 mm/slub.c:2765
 __slab_free+0x319/0x400 mm/slub.c:3723
 qlink_free mm/kasan/quarantine.c:166 [inline]
 qlist_free_all+0x75/0xd0 mm/kasan/quarantine.c:185
 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:306
 kasan_slab_alloc include/linux/kasan.h:188 [inline]
 slab_post_alloc_hook+0x6a/0x4d0 mm/slab.h:770
 slab_alloc_node mm/slub.c:3518 [inline]
 slab_alloc mm/slub.c:3526 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3533 [inline]
 kmem_cache_alloc+0x17e/0x2d0 mm/slub.c:3542
 kmem_cache_zalloc include/linux/slab.h:711 [inline]
 __kernfs_new_node+0xe5/0x7f0 fs/kernfs/dir.c:624
 kernfs_new_node+0x14c/0x260 fs/kernfs/dir.c:700
 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1068
 sysfs_add_file_mode_ns+0x237/0x2f0 fs/sysfs/file.c:298
 sysfs_merge_group+0x184/0x320 fs/sysfs/group.c:346
 dpm_sysfs_add+0xd2/0x270 drivers/base/power/sysfs.c:707

Memory state around the buggy address:
 ffff888026151d80: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc
 ffff888026151e00: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc
>ffff888026151e80: 00 00 00 00 fc fc fc fc 00 00 00 01 fc fc fc fc
                                                    ^
 ffff888026151f00: fa fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc
 ffff888026151f80: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/11 11:57 linux-6.6.y 5139929c698c e56a968c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in ecryptfs_verify_auth_tok_from_key
* Struck through repros no longer work on HEAD.