trusted_key: encrypted_key: insufficient parameters specified ================================================================== 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 ffff888026ae4ed8 by task syz.1.3230/17568 CPU: 1 UID: 0 PID: 17568 Comm: syz.1.3230 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 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+0x57b/0x15b0 fs/ecryptfs/main.c:453 vfs_get_tree+0x92/0x320 fs/super.c:1932 fc_mount fs/namespace.c:1278 [inline] do_new_mount_fc fs/namespace.c:3885 [inline] do_new_mount fs/namespace.c:3961 [inline] path_mount+0x7d0/0x2850 fs/namespace.c:4312 do_mount fs/namespace.c:4325 [inline] __do_sys_mount fs/namespace.c:4543 [inline] __se_sys_mount fs/namespace.c:4520 [inline] __ia32_sys_mount+0x292/0x310 fs/namespace.c:4520 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x13a/0x8b0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf73eefec Code: Unable to access opcode bytes at 0xf73eefc2. RSP: 002b:00000000f540650c EFLAGS: 00000292 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 0000000080000380 RCX: 00000000800003c0 RDX: 0000000080000400 RSI: 0000000000000000 RDI: 0000000080000440 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 17568: 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:5414 [inline] __kmalloc_noprof+0x32f/0x840 mm/slub.c:5439 _kmalloc_noprof include/linux/slab.h:995 [inline] user_preparse+0x9b/0x1c0 security/keys/user_defined.c:67 __key_create_or_update+0x413/0xe30 security/keys/key.c:854 key_create_or_update+0x42/0x60 security/keys/key.c:1021 __do_sys_add_key+0x2e8/0x460 security/keys/keyctl.c:134 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x13a/0x8b0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888026ae4ec0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes inside of allocated 25-byte region [ffff888026ae4ec0, ffff888026ae4ed9) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26ae4 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801d042780 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 4382091974 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x110d/0x35d0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7418 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __do_kmalloc_node mm/slub.c:5413 [inline] __kmalloc_noprof+0x67c/0x840 mm/slub.c:5439 _kmalloc_noprof include/linux/slab.h:995 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] kobject_get_path+0xcf/0x2c0 lib/kobject.c:161 kobject_uevent_env+0x287/0x18b0 lib/kobject_uevent.c:548 tty_register_device_attr+0x4dd/0x810 drivers/tty/tty_io.c:3277 tty_register_device drivers/tty/tty_io.c:3189 [inline] tty_register_driver+0x769/0xb50 drivers/tty/tty_io.c:3469 legacy_pty_init drivers/tty/pty.c:579 [inline] pty_init+0x65d/0xdc0 drivers/tty/pty.c:919 do_one_initcall+0x11c/0x6f0 init/main.c:1362 do_initcall_level init/main.c:1424 [inline] do_initcalls init/main.c:1440 [inline] do_basic_setup init/main.c:1460 [inline] kernel_init_freeable+0x6ea/0x7b0 init/main.c:1675 kernel_init+0x21/0x1e0 init/main.c:1565 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 page_owner free stack trace missing Memory state around the buggy address: ffff888026ae4d80: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff888026ae4e00: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc >ffff888026ae4e80: fa fb fb fb fc fc fc fc 00 00 00 01 fc fc fc fc ^ ffff888026ae4f00: fa fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ffff888026ae4f80: 00 00 00 fc fc fc fc fc 00 00 00 00 fc fc fc fc ==================================================================