program: getsockopt$TIPC_DEST_DROPPABLE(0xffffffffffffffff, 0x10f, 0x81, &(0x7f0000000080), &(0x7f00000000c0)=0x4) mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./mnt\x00', 0x1ff) mount(&(0x7f0000000040)=@loop={'/dev/loop', 0x0}, &(0x7f0000000100)='./mnt\x00', &(0x7f0000000140)='configfs\x00', 0x49080, &(0x7f0000000180)='\x00') add_key$user(&(0x7f00000003c0), &(0x7f0000000440), &(0x7f00000000c0), 0xc9, 0xfffffffffffffffd) mount(&(0x7f0000000400), &(0x7f0000000000)='./mnt\x00', &(0x7f0000000480)='ecryptfs\x00', 0x0, &(0x7f0000000500)='ecryptfs_sig=syz,ecryptfs_fnek_sig=syz,ecryptfs_cipher=aes,ecryptfs_key_bytes=16\x00') r0 = open(&(0x7f00000001c0)='./mnt\x00', 0x8000, 0x129) ioctl$sock_SIOCETHTOOL(r0, 0x8946, 0x0) r1 = openat$cgroup_ro(r0, &(0x7f0000000200)='blkio.bfq.time_recursive\x00', 0x0, 0x0) write$P9_RREADDIR(r1, &(0x7f0000000240)={0xbb, 0x29, 0x2, {0x7, [{{0x20, 0x4, 0x4}, 0x3, 0x9, 0x5, './mnt'}, {{0x0, 0x4}, 0x9, 0x2, 0x5, './mnt'}, {{0x8, 0x0, 0x2}, 0x2, 0x8, 0x5, './mnt'}, {{0x20}, 0x37, 0x4, 0x5, './mnt'}, {{0x2, 0x3, 0x3}, 0x68d9, 0x7, 0x5, './mnt'}, {{0x80, 0x4, 0x4}, 0x8, 0x8, 0x7, './file0'}]}}, 0xbb) [ 102.119626][ T47] Bluetooth: hci0: command tx timeout [ 102.270535][ T5335] ================================================================== [ 102.270550][ T5335] BUG: KASAN: slab-use-after-free in ecryptfs_write_tag_70_packet+0x1241/0x12e0 [ 102.270663][ T5335] Read of size 4 at addr ffff888053fc6898 by task syz.0.0/5335 [ 102.270694][ T5335] [ 102.270710][ T5335] CPU: 0 UID: 0 PID: 5335 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 102.270720][ T5335] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 102.270725][ T5335] Call Trace: [ 102.270746][ T5335] [ 102.270750][ T5335] dump_stack_lvl+0xe8/0x150 [ 102.270762][ T5335] print_address_description+0x55/0x1e0 [ 102.270774][ T5335] ? ecryptfs_write_tag_70_packet+0x1241/0x12e0 [ 102.270783][ T5335] print_report+0x58/0x70 [ 102.270792][ T5335] kasan_report+0x117/0x150 [ 102.270801][ T5335] ? ecryptfs_write_tag_70_packet+0x1241/0x12e0 [ 102.270812][ T5335] ecryptfs_write_tag_70_packet+0x1241/0x12e0 [ 102.270826][ T5335] ecryptfs_encrypt_and_encode_filename+0x576/0x1580 [ 102.270855][ T5335] ? __pfx_ecryptfs_encrypt_and_encode_filename+0x10/0x10 [ 102.270864][ T5335] ? __d_alloc_parallel+0x156f/0x1700 [ 102.270875][ T5335] ? __d_alloc_parallel+0x39e/0x1700 [ 102.270888][ T5335] ecryptfs_lookup+0x20e/0x780 [ 102.270899][ T5335] ? __pfx_ecryptfs_lookup+0x10/0x10 [ 102.270914][ T5335] ? d_lookup+0x1f/0xa0 [ 102.270930][ T5335] ? lockdep_hardirqs_on+0x7b/0x110 [ 102.270980][ T5335] lookup_open+0x94b/0x1970 [ 102.271003][ T5335] path_openat+0x70c/0x20f0 [ 102.271017][ T5335] do_file_open+0x23e/0x4a0 [ 102.271028][ T5335] ? __pfx_do_file_open+0x10/0x10 [ 102.271048][ T5335] ? _raw_spin_unlock+0x28/0x50 [ 102.271059][ T5335] ? alloc_fd+0x6af/0x760 [ 102.271074][ T5335] do_sys_openat2+0x115/0x200 [ 102.271087][ T5335] ? __se_sys_futex+0x3a8/0x450 [ 102.271101][ T5335] ? __pfx_do_sys_openat2+0x10/0x10 [ 102.271115][ T5335] ? rcu_is_watching+0x16/0xb0 [ 102.271131][ T5335] __x64_sys_openat+0x138/0x170 [ 102.271146][ T5335] do_syscall_64+0x166/0x520 [ 102.271161][ T5335] ? trace_irq_disable+0x3b/0x140 [ 102.271172][ T5335] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 102.271180][ T5335] ? clear_bhb_loop+0x70/0xc0 [ 102.271188][ T5335] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 102.271199][ T5335] RIP: 0033:0x7f6b1cb9f559 [ 102.271211][ T5335] 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 [ 102.271220][ T5335] RSP: 002b:00007f6b1d9bffe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 102.271236][ T5335] RAX: ffffffffffffffda RBX: 00007f6b1ce25fa0 RCX: 00007f6b1cb9f559 [ 102.271245][ T5335] RDX: 0000000000000000 RSI: 0000200000000200 RDI: 0000000000000003 [ 102.271253][ T5335] RBP: 00007f6b1cc36b20 R08: 0000000000000000 R09: 0000000000000000 [ 102.271260][ T5335] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 102.271267][ T5335] R13: 00007f6b1ce26038 R14: 00007f6b1ce25fa0 R15: 00007ffcc47f40e8 [ 102.271280][ T5335] [ 102.271284][ T5335] [ 102.271288][ T5335] Allocated by task 5335: [ 102.271294][ T5335] kasan_save_track+0x3e/0x80 [ 102.271310][ T5335] __kasan_kmalloc+0x93/0xb0 [ 102.271319][ T5335] __kvmalloc_node_noprof+0x50a/0x820 [ 102.271334][ T5335] __se_sys_add_key+0x289/0x420 [ 102.271341][ T5335] do_syscall_64+0x166/0x520 [ 102.271352][ T5335] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 102.271362][ T5335] [ 102.271365][ T5335] Freed by task 5335: [ 102.271370][ T5335] kasan_save_track+0x3e/0x80 [ 102.271384][ T5335] kasan_save_free_info+0x40/0x50 [ 102.271396][ T5335] __kasan_slab_free+0x5c/0x80 [ 102.271405][ T5335] kfree+0x1c5/0x650 [ 102.271417][ T5335] __se_sys_add_key+0x3a3/0x420 [ 102.271426][ T5335] do_syscall_64+0x166/0x520 [ 102.271438][ T5335] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 102.271448][ T5335] [ 102.271451][ T5335] The buggy address belongs to the object at ffff888053fc6800 [ 102.271451][ T5335] which belongs to the cache kmalloc-256 of size 256 [ 102.271461][ T5335] The buggy address is located 152 bytes inside of [ 102.271461][ T5335] freed 256-byte region [ffff888053fc6800, ffff888053fc6900) [ 102.271471][ T5335] [ 102.271474][ T5335] The buggy address belongs to the physical page: [ 102.271481][ T5335] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x53fc6 [ 102.271492][ T5335] flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) [ 102.271503][ T5335] page_type: f5(slab) [ 102.271516][ T5335] raw: 04fff00000000000 ffff88801c041b40 dead000000000100 dead000000000122 [ 102.271526][ T5335] raw: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 [ 102.271532][ T5335] page dumped because: kasan: bad access detected [ 102.271551][ T5335] page_owner tracks the page as allocated [ 102.271554][ T5335] page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5290, tgid 5290 (syz-executor), ts 99492402433 [ 102.271569][ T5335] post_alloc_hook+0x1f9/0x250 [ 102.271584][ T5335] get_page_from_freelist+0x2209/0x2280 [ 102.271608][ T5335] __alloc_frozen_pages_noprof+0x217/0x5a0 [ 102.271624][ T5335] allocate_slab+0x7d/0x620 [ 102.271635][ T5335] refill_objects+0x2d5/0x350 [ 102.271647][ T5335] __pcs_replace_empty_main+0x2c8/0x6c0 [ 102.271658][ T5335] __kmalloc_cache_noprof+0x396/0x600 [ 102.271673][ T5335] ____ip_mc_inc_group+0x518/0xdb0 [ 102.271684][ T5335] ip_mc_up+0x115/0x2e0 [ 102.271693][ T5335] inetdev_event+0xfc3/0x15e0 [ 102.271706][ T5335] notifier_call_chain+0x1a5/0x3d0 [ 102.271721][ T5335] __dev_notify_flags+0x31e/0x510 [ 102.271731][ T5335] netif_change_flags+0xde/0x1b0 [ 102.271741][ T5335] do_setlink+0xdd6/0x4670 [ 102.271750][ T5335] rtnl_newlink+0x15a3/0x1c30 [ 102.271758][ T5335] rtnetlink_rcv_msg+0x802/0xc00 [ 102.271774][ T5335] page last free pid 5290 tgid 5290 ts 99485260647 stack trace: [ 102.271783][ T5335] __free_frozen_pages+0xc93/0xd90 [ 102.271797][ T5335] __mmdrop+0xbc/0x4d0 [ 102.271808][ T5335] finish_task_switch+0x69a/0xc60 [ 102.271820][ T5335] __schedule+0x17e5/0x5820 [ 102.271830][ T5335] schedule+0x164/0x2b0 [ 102.271840][ T5335] schedule_timeout+0xc0/0x2c0 [ 102.271854][ T5335] __wait_for_common+0x3d7/0x700 [ 102.271867][ T5335] wait_for_completion_state+0x1c/0x40 [ 102.271878][ T5335] call_usermodehelper_exec+0x3ee/0x4b0 [ 102.271888][ T5335] __request_module+0x3db/0x630 [ 102.271899][ T5335] dev_ioctl+0x680/0x1150 [ 102.271915][ T5335] sock_do_ioctl+0x23e/0x320 [ 102.271927][ T5335] sock_ioctl+0x57a/0x7e0 [ 102.271938][ T5335] __se_sys_ioctl+0xfc/0x170 [ 102.271953][ T5335] do_syscall_64+0x166/0x520 [ 102.271963][ T5335] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 102.271974][ T5335] [ 102.271977][ T5335] Memory state around the buggy address: [ 102.271984][ T5335] ffff888053fc6780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 102.271991][ T5335] ffff888053fc6800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 102.271999][ T5335] >ffff888053fc6880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 102.272004][ T5335] ^ [ 102.272009][ T5335] ffff888053fc6900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 102.272016][ T5335] ffff888053fc6980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 102.272021][ T5335] ================================================================== [ 102.272266][ T5335] Kernel panic - not syncing: KASAN: panic_on_warn set ... [ 102.576968][ T5335] CPU: 0 UID: 0 PID: 5335 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 102.580914][ T5335] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 102.585350][ T5335] Call Trace: [ 102.586892][ T5335] [ 102.588136][ T5335] vpanic+0x56d/0xa60 [ 102.589876][ T5335] ? __pfx_vpanic+0x10/0x10 [ 102.591916][ T5335] panic+0xc5/0xd0 [ 102.593553][ T5335] ? __pfx_panic+0x10/0x10 [ 102.595512][ T5335] ? preempt_schedule_thunk+0x16/0x40 [ 102.597796][ T5335] ? preempt_schedule_thunk+0x16/0x40 [ 102.600092][ T5335] ? ecryptfs_write_tag_70_packet+0x1241/0x12e0 [ 102.602799][ T5335] check_panic_on_warn+0x89/0xb0 [ 102.605020][ T5335] ? ecryptfs_write_tag_70_packet+0x1241/0x12e0 [ 102.607742][ T5335] end_report+0x73/0x170 [ 102.609569][ T5335] ? ecryptfs_write_tag_70_packet+0x1241/0x12e0 [ 102.612235][ T5335] kasan_report+0x128/0x150 [ 102.614324][ T5335] ? ecryptfs_write_tag_70_packet+0x1241/0x12e0 [ 102.617070][ T5335] ecryptfs_write_tag_70_packet+0x1241/0x12e0 [ 102.619728][ T5335] ecryptfs_encrypt_and_encode_filename+0x576/0x1580 [ 102.622699][ T5335] ? __pfx_ecryptfs_encrypt_and_encode_filename+0x10/0x10 [ 102.625789][ T5335] ? __d_alloc_parallel+0x156f/0x1700 [ 102.628231][ T5335] ? __d_alloc_parallel+0x39e/0x1700 [ 102.631012][ T5335] ecryptfs_lookup+0x20e/0x780 [ 102.633169][ T5335] ? __pfx_ecryptfs_lookup+0x10/0x10 [ 102.635561][ T5335] ? d_lookup+0x1f/0xa0 [ 102.637444][ T5335] ? lockdep_hardirqs_on+0x7b/0x110 [ 102.639776][ T5335] lookup_open+0x94b/0x1970 [ 102.641771][ T5335] path_openat+0x70c/0x20f0 [ 102.643765][ T5335] do_file_open+0x23e/0x4a0 [ 102.645727][ T5335] ? __pfx_do_file_open+0x10/0x10 [ 102.647978][ T5335] ? _raw_spin_unlock+0x28/0x50 [ 102.650188][ T5335] ? alloc_fd+0x6af/0x760 [ 102.652148][ T5335] do_sys_openat2+0x115/0x200 [ 102.654296][ T5335] ? __se_sys_futex+0x3a8/0x450 [ 102.656556][ T5335] ? __pfx_do_sys_openat2+0x10/0x10 [ 102.658944][ T5335] ? rcu_is_watching+0x16/0xb0 [ 102.661205][ T5335] __x64_sys_openat+0x138/0x170 [ 102.663378][ T5335] do_syscall_64+0x166/0x520 [ 102.665492][ T5335] ? trace_irq_disable+0x3b/0x140 [ 102.667691][ T5335] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 102.670238][ T5335] ? clear_bhb_loop+0x70/0xc0 [ 102.672373][ T5335] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 102.674994][ T5335] RIP: 0033:0x7f6b1cb9f559 [ 102.677082][ T5335] 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 [ 102.685339][ T5335] RSP: 002b:00007f6b1d9bffe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 102.689560][ T5335] RAX: ffffffffffffffda RBX: 00007f6b1ce25fa0 RCX: 00007f6b1cb9f559 [ 102.693573][ T5335] RDX: 0000000000000000 RSI: 0000200000000200 RDI: 0000000000000003 [ 102.696958][ T5335] RBP: 00007f6b1cc36b20 R08: 0000000000000000 R09: 0000000000000000 [ 102.700346][ T5335] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 102.703616][ T5335] R13: 00007f6b1ce26038 R14: 00007f6b1ce25fa0 R15: 00007ffcc47f40e8 [ 102.707153][ T5335] [ 102.708941][ T5335] Kernel Offset: disabled [ 102.710859][ T5335] Rebooting in 86400 seconds..