================================================================== BUG: KASAN: slab-out-of-bounds in ecryptfs_verify_auth_tok_from_key+0x3b7/0x400 fs/ecryptfs/keystore.c:465 Read of size 2 at addr ffff88805833ad98 by task syz.4.7192/25266 CPU: 0 UID: 0 PID: 25266 Comm: syz.4.7192 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 ecryptfs_verify_auth_tok_from_key+0x3b7/0x400 fs/ecryptfs/keystore.c:465 ecryptfs_keyring_auth_tok_for_sig+0x9e/0x1f0 fs/ecryptfs/keystore.c:1606 ecryptfs_init_global_auth_toks fs/ecryptfs/main.c:194 [inline] ecryptfs_validate_options fs/ecryptfs/main.c:420 [inline] ecryptfs_get_tree+0x584/0x1580 fs/ecryptfs/main.c:453 vfs_get_tree+0x92/0x320 fs/super.c:1943 fc_mount fs/namespace.c:1282 [inline] do_new_mount_fc fs/namespace.c:3910 [inline] do_new_mount fs/namespace.c:3986 [inline] path_mount+0x7d0/0x2850 fs/namespace.c:4337 do_mount fs/namespace.c:4350 [inline] __do_sys_mount fs/namespace.c:4565 [inline] __se_sys_mount fs/namespace.c:4542 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4542 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb3cb59f559 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:00007fb3c97f6028 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fb3cb825fa0 RCX: 00007fb3cb59f559 RDX: 00002000000000c0 RSI: 0000200000000080 RDI: 0000200000000040 RBP: 00007fb3cb636b20 R08: 0000200000000100 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fb3cb826038 R14: 00007fb3cb825fa0 R15: 00007ffe6498b728 Allocated by task 22599: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:409 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:426 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5531 [inline] __kmalloc_noprof+0x32f/0x840 mm/slub.c:5556 _kmalloc_noprof include/linux/slab.h:995 [inline] user_preparse+0x9b/0x1c0 security/keys/user_defined.c:67 __key_create_or_update+0x3f6/0xe10 security/keys/key.c:861 key_create_or_update+0x42/0x60 security/keys/key.c:1028 __do_sys_add_key+0x2e8/0x460 security/keys/keyctl.c:134 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88805833ad80 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes inside of allocated 25-byte region [ffff88805833ad80, ffff88805833ad99) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5833a flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88813ff07780 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000400040 00000000f5000000 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 0xd2c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5715, tgid 5715 (modprobe), ts 101782339795 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1856 prep_new_page mm/page_alloc.c:1864 [inline] get_page_from_freelist+0x1113/0x35e0 mm/page_alloc.c:3935 __alloc_frozen_pages_noprof+0x2bd/0x3280 mm/page_alloc.c:5444 alloc_slab_page mm/slub.c:3384 [inline] allocate_slab mm/slub.c:3499 [inline] new_slab+0xb1/0x6d0 mm/slub.c:3550 refill_objects+0xe3/0x410 mm/slub.c:7539 refill_sheaf mm/slub.c:2917 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4811 alloc_from_pcs mm/slub.c:4887 [inline] slab_alloc_node mm/slub.c:5021 [inline] __do_kmalloc_node mm/slub.c:5530 [inline] __kmalloc_noprof+0x677/0x840 mm/slub.c:5556 _kmalloc_noprof include/linux/slab.h:995 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] tomoyo_encode2+0xfb/0x3c0 security/tomoyo/realpath.c:45 tomoyo_encode+0x29/0x50 security/tomoyo/realpath.c:80 tomoyo_realpath_from_path+0x18c/0x690 security/tomoyo/realpath.c:283 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x276/0x460 security/tomoyo/file.c:827 security_inode_getattr+0x116/0x280 security/security.c:1917 vfs_getattr fs/stat.c:263 [inline] vfs_fstat+0x4b/0xe0 fs/stat.c:285 __do_sys_newfstat+0x8b/0x110 fs/stat.c:555 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5297 tgid 5297 ts 101780758174 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1403 [inline] __free_frozen_pages+0x7b4/0x1110 mm/page_alloc.c:2954 __pagetable_free include/linux/mm.h:3959 [inline] pagetable_free include/linux/mm.h:3983 [inline] pagetable_dtor_free include/linux/mm.h:4082 [inline] __tlb_remove_table include/asm-generic/tlb.h:205 [inline] __tlb_remove_table_free mm/mmu_gather.c:226 [inline] tlb_remove_table_rcu+0x2cf/0x380 mm/mmu_gather.c:287 rcu_do_batch kernel/rcu/tree.c:2650 [inline] rcu_core+0x5f0/0x1220 kernel/rcu/tree.c:2919 handle_softirqs+0x216/0xa20 kernel/softirq.c:669 do_softirq kernel/softirq.c:569 [inline] do_softirq+0xaf/0xf0 kernel/softirq.c:556 __local_bh_enable_ip+0xff/0x120 kernel/softirq.c:473 local_bh_enable include/linux/bottom_half.h:33 [inline] __alloc_skb+0x5db/0x710 net/core/skbuff.c:700 alloc_skb include/linux/skbuff.h:1390 [inline] netlink_dump+0x6e2/0xd00 net/netlink/af_netlink.c:2310 netlink_recvmsg+0x86a/0xb60 net/netlink/af_netlink.c:2002 sock_recvmsg_nosec net/socket.c:1154 [inline] sock_recvmsg+0x1d5/0x220 net/socket.c:1176 ____sys_recvmsg+0x21e/0x6a0 net/socket.c:2935 ___sys_recvmsg+0x16a/0x1a0 net/socket.c:2977 __sys_recvmsg net/socket.c:3010 [inline] __do_sys_recvmsg net/socket.c:3016 [inline] __se_sys_recvmsg net/socket.c:3013 [inline] __x64_sys_recvmsg+0x19a/0x260 net/socket.c:3013 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88805833ac80: fa fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ffff88805833ad00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc >ffff88805833ad80: 00 00 00 01 fc fc fc fc 00 00 00 00 fc fc fc fc ^ ffff88805833ae00: fa fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ffff88805833ae80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ================================================================== ecryptfs_verify_version: Minor version number mismatch. Expected [4]; got [0] Data structure version mismatch. Userspace tools must match eCryptfs kernel module with major version [0] and minor version [4] Could not find valid key in user session keyring for sig specified in mount option: [syz0] One or more global auth toks could not properly register; rc = [-22] Error validating options; rc = [-22]