[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 28.214897] kauditd_printk_skb: 7 callbacks suppressed [ 28.214910] audit: type=1800 audit(1541644536.564:29): pid=5568 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 28.247308] audit: type=1800 audit(1541644536.564:30): pid=5568 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 50.885776] sshd (5709) used greatest stack depth: 15744 bytes left Warning: Permanently added '10.128.0.18' (ECDSA) to the list of known hosts. executing program executing program [ 57.348626] ================================================================== [ 57.356237] BUG: KASAN: use-after-free in crypto_gcm_init_common+0xe2/0x710 [ 57.363321] Read of size 12 at addr ffff8801d2c05b00 by task kworker/1:2/2856 [ 57.370572] [ 57.372185] CPU: 1 PID: 2856 Comm: kworker/1:2 Not tainted 4.20.0-rc1+ #102 [ 57.379265] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 57.388610] Workqueue: pencrypt padata_parallel_worker [ 57.393877] Call Trace: [ 57.396455] dump_stack+0x244/0x39d [ 57.400066] ? dump_stack_print_info.cold.1+0x20/0x20 [ 57.405241] ? printk+0xa7/0xcf [ 57.408506] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 57.413261] ? lock_downgrade+0x900/0x900 [ 57.417399] print_address_description.cold.7+0x9/0x1ff [ 57.422750] kasan_report.cold.8+0x242/0x309 [ 57.427142] ? crypto_gcm_init_common+0xe2/0x710 [ 57.431888] check_memory_region+0x13e/0x1b0 [ 57.436290] memcpy+0x23/0x50 [ 57.439381] crypto_gcm_init_common+0xe2/0x710 [ 57.443967] crypto_gcm_encrypt+0xe2/0x6b0 [ 57.448190] pcrypt_aead_enc+0xd6/0x340 [ 57.452153] padata_parallel_worker+0x49d/0x760 [ 57.456808] ? padata_alloc_pd+0xe90/0xe90 [ 57.461026] ? zap_class+0x640/0x640 [ 57.464747] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 57.470281] ? check_preemption_disabled+0x48/0x280 [ 57.475304] ? __lock_is_held+0xb5/0x140 [ 57.479358] process_one_work+0xc90/0x1c40 [ 57.483577] ? mark_held_locks+0x130/0x130 [ 57.487805] ? pwq_dec_nr_in_flight+0x4a0/0x4a0 [ 57.492458] ? __switch_to_asm+0x40/0x70 [ 57.496503] ? __switch_to_asm+0x34/0x70 [ 57.500546] ? __switch_to_asm+0x34/0x70 [ 57.504593] ? __switch_to_asm+0x40/0x70 [ 57.508641] ? __switch_to_asm+0x34/0x70 [ 57.512683] ? __switch_to_asm+0x40/0x70 [ 57.516728] ? __switch_to_asm+0x34/0x70 [ 57.520772] ? __switch_to_asm+0x40/0x70 [ 57.524819] ? __schedule+0x8d7/0x21d0 [ 57.528696] ? lock_downgrade+0x900/0x900 [ 57.532843] ? zap_class+0x640/0x640 [ 57.536550] ? zap_class+0x640/0x640 [ 57.540274] ? find_held_lock+0x36/0x1c0 [ 57.544321] ? lockdep_hardirqs_on+0x3bb/0x5b0 [ 57.548894] ? lock_acquire+0x1ed/0x520 [ 57.552857] ? worker_thread+0x3e0/0x1390 [ 57.557002] ? kasan_check_read+0x11/0x20 [ 57.561133] ? do_raw_spin_lock+0x14f/0x350 [ 57.565438] ? kasan_check_read+0x11/0x20 [ 57.569571] ? rwlock_bug.part.2+0x90/0x90 [ 57.573790] ? trace_hardirqs_on+0x310/0x310 [ 57.578192] worker_thread+0x17f/0x1390 [ 57.582150] ? __switch_to_asm+0x34/0x70 [ 57.586200] ? process_one_work+0x1c40/0x1c40 [ 57.590685] ? zap_class+0x640/0x640 [ 57.594396] ? __kthread_parkme+0xce/0x1a0 [ 57.598621] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 57.603712] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 57.608799] ? lockdep_hardirqs_on+0x3bb/0x5b0 [ 57.613364] ? trace_hardirqs_on+0xbd/0x310 [ 57.617671] ? kasan_check_read+0x11/0x20 [ 57.621804] ? __kthread_parkme+0xce/0x1a0 [ 57.626025] ? trace_hardirqs_off_caller+0x310/0x310 [ 57.631113] ? trace_hardirqs_off_caller+0x310/0x310 [ 57.636210] ? _raw_spin_unlock_irqrestore+0x6d/0xd0 [ 57.641301] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 57.646821] ? __kthread_parkme+0xfb/0x1a0 [ 57.651039] ? process_one_work+0x1c40/0x1c40 [ 57.655517] kthread+0x35a/0x440 [ 57.658873] ? kthread_stop+0x900/0x900 [ 57.662836] ret_from_fork+0x3a/0x50 [ 57.666542] [ 57.668151] Allocated by task 5737: [ 57.671765] save_stack+0x43/0xd0 [ 57.675201] kasan_kmalloc+0xc7/0xe0 [ 57.678897] kmem_cache_alloc_trace+0x152/0x750 [ 57.683555] tls_set_sw_offload+0xcb3/0x1390 [ 57.687945] tls_setsockopt+0x689/0x770 [ 57.691947] sock_common_setsockopt+0x9a/0xe0 [ 57.696441] __sys_setsockopt+0x1ba/0x3c0 [ 57.700575] __x64_sys_setsockopt+0xbe/0x150 [ 57.704968] do_syscall_64+0x1b9/0x820 [ 57.708839] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 57.714010] [ 57.715622] Freed by task 5737: [ 57.718901] save_stack+0x43/0xd0 [ 57.722338] __kasan_slab_free+0x102/0x150 [ 57.726558] kasan_slab_free+0xe/0x10 [ 57.730339] kfree+0xcf/0x230 [ 57.733424] tls_sk_proto_close+0x5fa/0x750 [ 57.737728] inet_release+0x104/0x1f0 [ 57.741515] inet6_release+0x50/0x70 [ 57.745210] __sock_release+0xd7/0x250 [ 57.749077] sock_close+0x19/0x20 [ 57.752515] __fput+0x385/0xa30 [ 57.755781] ____fput+0x15/0x20 [ 57.759047] task_work_run+0x1e8/0x2a0 [ 57.762938] exit_to_usermode_loop+0x318/0x380 [ 57.767506] do_syscall_64+0x6be/0x820 [ 57.771378] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 57.776545] [ 57.778158] The buggy address belongs to the object at ffff8801d2c05b00 [ 57.778158] which belongs to the cache kmalloc-32 of size 32 [ 57.790626] The buggy address is located 0 bytes inside of [ 57.790626] 32-byte region [ffff8801d2c05b00, ffff8801d2c05b20) [ 57.802219] The buggy address belongs to the page: [ 57.807147] page:ffffea00074b0140 count:1 mapcount:0 mapping:ffff8801da8001c0 index:0xffff8801d2c05fc1 [ 57.816573] flags: 0x2fffc0000000200(slab) [ 57.820797] raw: 02fffc0000000200 ffffea00074b04c8 ffffea000755e548 ffff8801da8001c0 [ 57.828662] raw: ffff8801d2c05fc1 ffff8801d2c05000 000000010000002e 0000000000000000 [ 57.836523] page dumped because: kasan: bad access detected [ 57.842210] [ 57.843815] Memory state around the buggy address: [ 57.848725] ffff8801d2c05a00: 06 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc [ 57.856064] ffff8801d2c05a80: fb fb fb fb fc fc fc fc 00 00 01 fc fc fc fc fc [ 57.863436] >ffff8801d2c05b00: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc [ 57.870792] ^ [ 57.874155] ffff8801d2c05b80: 06 fc fc fc fc fc fc fc 06 fc fc fc fc fc fc fc [ 57.881497] ffff8801d2c05c00: 06 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc [ 57.888833] ================================================================== [ 57.896175] Disabling lock debugging due to kernel taint [ 57.901758] Kernel panic - not syncing: panic_on_warn set ... [ 57.907655] CPU: 1 PID: 2856 Comm: kworker/1:2 Tainted: G B 4.20.0-rc1+ #102 [ 57.916135] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 57.925480] Workqueue: pencrypt padata_parallel_worker [ 57.930754] Call Trace: [ 57.933340] dump_stack+0x244/0x39d [ 57.936954] ? dump_stack_print_info.cold.1+0x20/0x20 [ 57.942136] panic+0x2ad/0x55c [ 57.945317] ? add_taint.cold.5+0x16/0x16 [ 57.949473] ? trace_hardirqs_on+0x9a/0x310 [ 57.953804] ? trace_hardirqs_on+0xb4/0x310 [ 57.958119] ? trace_hardirqs_on+0xb4/0x310 [ 57.962429] kasan_end_report+0x47/0x4f [ 57.966388] kasan_report.cold.8+0x76/0x309 [ 57.970696] ? crypto_gcm_init_common+0xe2/0x710 [ 57.975437] check_memory_region+0x13e/0x1b0 [ 57.979830] memcpy+0x23/0x50 [ 57.982930] crypto_gcm_init_common+0xe2/0x710 [ 57.987495] crypto_gcm_encrypt+0xe2/0x6b0 [ 57.991715] pcrypt_aead_enc+0xd6/0x340 [ 57.995675] padata_parallel_worker+0x49d/0x760 [ 58.000331] ? padata_alloc_pd+0xe90/0xe90 [ 58.004551] ? zap_class+0x640/0x640 [ 58.008252] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 58.013777] ? check_preemption_disabled+0x48/0x280 [ 58.018781] ? __lock_is_held+0xb5/0x140 [ 58.022830] process_one_work+0xc90/0x1c40 [ 58.027057] ? mark_held_locks+0x130/0x130 [ 58.031279] ? pwq_dec_nr_in_flight+0x4a0/0x4a0 [ 58.035936] ? __switch_to_asm+0x40/0x70 [ 58.039979] ? __switch_to_asm+0x34/0x70 [ 58.044029] ? __switch_to_asm+0x34/0x70 [ 58.048075] ? __switch_to_asm+0x40/0x70 [ 58.052120] ? __switch_to_asm+0x34/0x70 [ 58.056168] ? __switch_to_asm+0x40/0x70 [ 58.060216] ? __switch_to_asm+0x34/0x70 [ 58.064262] ? __switch_to_asm+0x40/0x70 [ 58.068306] ? __schedule+0x8d7/0x21d0 [ 58.072183] ? lock_downgrade+0x900/0x900 [ 58.076317] ? zap_class+0x640/0x640 [ 58.080028] ? zap_class+0x640/0x640 [ 58.083741] ? find_held_lock+0x36/0x1c0 [ 58.087815] ? lockdep_hardirqs_on+0x3bb/0x5b0 [ 58.092389] ? lock_acquire+0x1ed/0x520 [ 58.096347] ? worker_thread+0x3e0/0x1390 [ 58.100483] ? kasan_check_read+0x11/0x20 [ 58.104618] ? do_raw_spin_lock+0x14f/0x350 [ 58.108923] ? kasan_check_read+0x11/0x20 [ 58.113055] ? rwlock_bug.part.2+0x90/0x90 [ 58.117273] ? trace_hardirqs_on+0x310/0x310 [ 58.121669] worker_thread+0x17f/0x1390 [ 58.125631] ? __switch_to_asm+0x34/0x70 [ 58.129690] ? process_one_work+0x1c40/0x1c40 [ 58.134176] ? zap_class+0x640/0x640 [ 58.137888] ? __kthread_parkme+0xce/0x1a0 [ 58.142110] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 58.147198] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 58.152284] ? lockdep_hardirqs_on+0x3bb/0x5b0 [ 58.156849] ? trace_hardirqs_on+0xbd/0x310 [ 58.161182] ? kasan_check_read+0x11/0x20 [ 58.165315] ? __kthread_parkme+0xce/0x1a0 [ 58.169548] ? trace_hardirqs_off_caller+0x310/0x310 [ 58.174640] ? trace_hardirqs_off_caller+0x310/0x310 [ 58.179731] ? _raw_spin_unlock_irqrestore+0x6d/0xd0 [ 58.184820] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 58.190344] ? __kthread_parkme+0xfb/0x1a0 [ 58.194566] ? process_one_work+0x1c40/0x1c40 [ 58.199043] kthread+0x35a/0x440 [ 58.202397] ? kthread_stop+0x900/0x900 [ 58.206358] ret_from_fork+0x3a/0x50 [ 58.211169] Kernel Offset: disabled [ 58.214794] Rebooting in 86400 seconds..