program: r0 = seccomp$SECCOMP_SET_MODE_FILTER_LISTENER(0x1, 0x0, &(0x7f0000000040)={0x1, &(0x7f0000000000)=[{0x6, 0x0, 0x2, 0x7fff7ffc}]}) add_key$user(&(0x7f0000000040), &(0x7f0000000080)={'syz', 0x0}, &(0x7f0000000100)="040000", 0x3, 0xfffffffffffffffd) mkdirat(0xffffffffffffff9c, &(0x7f0000000400)='./lower\x00', 0x1ff) mkdirat(0xffffffffffffff9c, &(0x7f0000000440)='./mnt\x00', 0x1ff) mount(&(0x7f0000000400)=@filename='./lower\x00', &(0x7f0000000440)='./mnt\x00', &(0x7f0000000480)='ecryptfs\x00', 0x0, &(0x7f0000000500)='ecryptfs_sig=syz ,ecryptfs_fnek_sig=syz ,ecryptfs_cipher=aes,ecryptfs_key_bytes=16\x00') openat(0xffffffffffffff9c, &(0x7f0000000440)='./mnt\x00', 0x0, 0x0) close_range(r0, 0xffffffffffffffff, 0x200000000000000) [ 106.669719][ T4649] Bluetooth: hci0: command tx timeout [ 106.808829][ T5324] ================================================================== [ 106.808842][ T5324] BUG: KASAN: slab-out-of-bounds in ecryptfs_verify_auth_tok_from_key+0x38f/0x3a0 [ 106.808945][ T5324] Read of size 2 at addr ffff8880120882db by task syz.0.0/5324 [ 106.808955][ T5324] [ 106.808963][ T5324] CPU: 0 UID: 0 PID: 5324 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 106.808977][ T5324] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 106.808994][ T5324] Call Trace: [ 106.809000][ T5324] [ 106.809005][ T5324] dump_stack_lvl+0xe8/0x150 [ 106.809025][ T5324] print_address_description+0x55/0x1e0 [ 106.809042][ T5324] ? ecryptfs_verify_auth_tok_from_key+0x38f/0x3a0 [ 106.809055][ T5324] print_report+0x58/0x70 [ 106.809067][ T5324] kasan_report+0x117/0x150 [ 106.809080][ T5324] ? ecryptfs_verify_auth_tok_from_key+0x38f/0x3a0 [ 106.809095][ T5324] ecryptfs_verify_auth_tok_from_key+0x38f/0x3a0 [ 106.809109][ T5324] ecryptfs_keyring_auth_tok_for_sig+0xec/0x250 [ 106.809124][ T5324] ecryptfs_get_tree+0x563/0x1370 [ 106.809144][ T5324] ? __pfx_ecryptfs_get_tree+0x10/0x10 [ 106.809162][ T5324] vfs_get_tree+0x92/0x2a0 [ 106.809178][ T5324] do_new_mount+0x319/0xdc0 [ 106.809191][ T5324] ? __pfx_do_new_mount+0x10/0x10 [ 106.809203][ T5324] ? ns_capable+0x89/0xe0 [ 106.809219][ T5324] ? path_mount+0x647/0x1050 [ 106.809231][ T5324] ? user_path_at+0xd4/0x160 [ 106.809246][ T5324] __se_sys_mount+0x31d/0x420 [ 106.809260][ T5324] ? __pfx___se_sys_mount+0x10/0x10 [ 106.809274][ T5324] ? __seccomp_permit_syscall+0xe7/0x2b0 [ 106.809288][ T5324] ? __x64_sys_mount+0x20/0xc0 [ 106.809301][ T5324] do_syscall_64+0x166/0x520 [ 106.809356][ T5324] ? trace_irq_disable+0x3b/0x140 [ 106.809368][ T5324] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 106.809381][ T5324] ? clear_bhb_loop+0x70/0xc0 [ 106.809395][ T5324] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 106.809406][ T5324] RIP: 0033:0x7f1b0a39e159 [ 106.809418][ T5324] 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 [ 106.809427][ T5324] RSP: 002b:00007f1b0b2cbfe8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 [ 106.809442][ T5324] RAX: ffffffffffffffda RBX: 00007f1b0a625fa0 RCX: 00007f1b0a39e159 [ 106.809450][ T5324] RDX: 0000200000000480 RSI: 0000200000000440 RDI: 0000200000000400 [ 106.809460][ T5324] RBP: 00007f1b0a43503b R08: 0000200000000500 R09: 0000000000000000 [ 106.809468][ T5324] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 106.809476][ T5324] R13: 00007f1b0a626038 R14: 00007f1b0a625fa0 R15: 00007fff2d1dfdd8 [ 106.809489][ T5324] [ 106.809494][ T5324] [ 106.809497][ T5324] Allocated by task 5324: [ 106.809502][ T5324] kasan_save_track+0x3e/0x80 [ 106.809547][ T5324] __kasan_kmalloc+0x93/0xb0 [ 106.809557][ T5324] __kmalloc_noprof+0x36b/0x720 [ 106.809573][ T5324] user_preparse+0x9e/0x160 [ 106.809585][ T5324] __key_create_or_update+0x3a9/0xa80 [ 106.809597][ T5324] key_create_or_update+0x42/0x60 [ 106.809608][ T5324] __se_sys_add_key+0x349/0x420 [ 106.809620][ T5324] do_syscall_64+0x166/0x520 [ 106.809630][ T5324] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 106.809640][ T5324] [ 106.809643][ T5324] The buggy address belongs to the object at ffff8880120882c0 [ 106.809643][ T5324] which belongs to the cache kmalloc-32 of size 32 [ 106.809652][ T5324] The buggy address is located 0 bytes to the right of [ 106.809652][ T5324] allocated 27-byte region [ffff8880120882c0, ffff8880120882db) [ 106.809663][ T5324] [ 106.809666][ T5324] The buggy address belongs to the physical page: [ 106.809673][ T5324] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12088 [ 106.809694][ T5324] flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) [ 106.809705][ T5324] page_type: f5(slab) [ 106.809716][ T5324] raw: 00fff00000000000 ffff88801b041780 dead000000000100 dead000000000122 [ 106.809726][ T5324] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 106.809732][ T5324] page dumped because: kasan: bad access detected [ 106.809738][ T5324] page_owner tracks the page as allocated [ 106.809743][ T5324] page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4988, tgid 4988 (ip), ts 76646916271 [ 106.809760][ T5324] post_alloc_hook+0x1f9/0x250 [ 106.809774][ T5324] get_page_from_freelist+0x2209/0x2280 [ 106.809789][ T5324] __alloc_frozen_pages_noprof+0x217/0x5a0 [ 106.809803][ T5324] allocate_slab+0x7d/0x620 [ 106.809814][ T5324] refill_objects+0x2d5/0x350 [ 106.809824][ T5324] __pcs_replace_empty_main+0x2c8/0x6c0 [ 106.809835][ T5324] __kmalloc_noprof+0x47b/0x720 [ 106.809848][ T5324] tomoyo_encode+0x2ad/0x570 [ 106.809859][ T5324] tomoyo_realpath_from_path+0x5fa/0x640 [ 106.809870][ T5324] tomoyo_path_perm+0x283/0x560 [ 106.809885][ T5324] security_inode_getattr+0x12b/0x310 [ 106.809898][ T5324] __x64_sys_newfstat+0x133/0x270 [ 106.809916][ T5324] do_syscall_64+0x166/0x520 [ 106.809928][ T5324] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 106.809938][ T5324] page last free pid 15 tgid 15 ts 76643334196 stack trace: [ 106.809946][ T5324] __free_frozen_pages+0xc93/0xd90 [ 106.809962][ T5324] tlb_remove_table_rcu+0x85/0x100 [ 106.809977][ T5324] rcu_core+0x926/0x1260 [ 106.809988][ T5324] handle_softirqs+0x226/0x860 [ 106.810001][ T5324] run_ksoftirqd+0x36/0x60 [ 106.810016][ T5324] smpboot_thread_fn+0x565/0xa70 [ 106.810032][ T5324] kthread+0x38b/0x480 [ 106.810041][ T5324] ret_from_fork+0x514/0xb70 [ 106.810050][ T5324] ret_from_fork_asm+0x1a/0x30 [ 106.810066][ T5324] [ 106.810069][ T5324] Memory state around the buggy address: [ 106.810075][ T5324] ffff888012088180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 106.810082][ T5324] ffff888012088200: 00 00 00 fc fc fc fc fc 00 00 00 00 fc fc fc fc [ 106.810090][ T5324] >ffff888012088280: fa fb fb fb fc fc fc fc 00 00 00 03 fc fc fc fc [ 106.810095][ T5324] ^ [ 106.810101][ T5324] ffff888012088300: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 106.810108][ T5324] ffff888012088380: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 106.810114][ T5324] ================================================================== [ 106.810122][ T5324] Kernel panic - not syncing: KASAN: panic_on_warn set ... [ 107.075719][ T5324] CPU: 0 UID: 0 PID: 5324 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 107.080229][ T5324] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 107.084516][ T5324] Call Trace: [ 107.085936][ T5324] [ 107.087201][ T5324] vpanic+0x56d/0xa60 [ 107.088870][ T5324] ? __pfx_vpanic+0x10/0x10 [ 107.090840][ T5324] panic+0xc5/0xd0 [ 107.092454][ T5324] ? __pfx_panic+0x10/0x10 [ 107.094492][ T5324] ? ecryptfs_verify_auth_tok_from_key+0x38f/0x3a0 [ 107.097174][ T5324] ? rcu_is_watching+0x16/0xb0 [ 107.099227][ T5324] ? ecryptfs_verify_auth_tok_from_key+0x38f/0x3a0 [ 107.101885][ T5324] check_panic_on_warn+0x89/0xb0 [ 107.103851][ T5324] ? ecryptfs_verify_auth_tok_from_key+0x38f/0x3a0 [ 107.106545][ T5324] end_report+0x73/0x170 [ 107.108410][ T5324] ? ecryptfs_verify_auth_tok_from_key+0x38f/0x3a0 [ 107.111060][ T5324] kasan_report+0x128/0x150 [ 107.113010][ T5324] ? ecryptfs_verify_auth_tok_from_key+0x38f/0x3a0 [ 107.115710][ T5324] ecryptfs_verify_auth_tok_from_key+0x38f/0x3a0 [ 107.118493][ T5324] ecryptfs_keyring_auth_tok_for_sig+0xec/0x250 [ 107.121152][ T5324] ecryptfs_get_tree+0x563/0x1370 [ 107.123365][ T5324] ? __pfx_ecryptfs_get_tree+0x10/0x10 [ 107.125665][ T5324] vfs_get_tree+0x92/0x2a0 [ 107.127472][ T5324] do_new_mount+0x319/0xdc0 [ 107.129376][ T5324] ? __pfx_do_new_mount+0x10/0x10 [ 107.131533][ T5324] ? ns_capable+0x89/0xe0 [ 107.133369][ T5324] ? path_mount+0x647/0x1050 [ 107.135392][ T5324] ? user_path_at+0xd4/0x160 [ 107.137325][ T5324] __se_sys_mount+0x31d/0x420 [ 107.139342][ T5324] ? __pfx___se_sys_mount+0x10/0x10 [ 107.141637][ T5324] ? __seccomp_permit_syscall+0xe7/0x2b0 [ 107.144043][ T5324] ? __x64_sys_mount+0x20/0xc0 [ 107.146134][ T5324] do_syscall_64+0x166/0x520 [ 107.148214][ T5324] ? trace_irq_disable+0x3b/0x140 [ 107.150343][ T5324] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 107.152859][ T5324] ? clear_bhb_loop+0x70/0xc0 [ 107.154957][ T5324] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 107.157280][ T5324] RIP: 0033:0x7f1b0a39e159 [ 107.159273][ T5324] 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 [ 107.167412][ T5324] RSP: 002b:00007f1b0b2cbfe8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 [ 107.170975][ T5324] RAX: ffffffffffffffda RBX: 00007f1b0a625fa0 RCX: 00007f1b0a39e159 [ 107.174284][ T5324] RDX: 0000200000000480 RSI: 0000200000000440 RDI: 0000200000000400 [ 107.177533][ T5324] RBP: 00007f1b0a43503b R08: 0000200000000500 R09: 0000000000000000 [ 107.180880][ T5324] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 107.184088][ T5324] R13: 00007f1b0a626038 R14: 00007f1b0a625fa0 R15: 00007fff2d1dfdd8 [ 107.187502][ T5324] [ 107.189495][ T5324] Kernel Offset: disabled [ 107.191507][ T5324] Rebooting in 86400 seconds..