[....] 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. [ 27.137565] kauditd_printk_skb: 7 callbacks suppressed [ 27.137577] audit: type=1800 audit(1538219201.522:29): pid=5229 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 27.171066] audit: type=1800 audit(1538219201.522:30): pid=5229 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.48' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 65.006210] raw_sendmsg: syz-executor978 forgot to set AF_INET. Fix it! executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 66.121883] ================================================================== [ 66.129609] BUG: KASAN: use-after-free in ip_cmsg_recv_offset+0x12be/0x1390 [ 66.136713] Read of size 4 at addr ffff8801c17ceae0 by task syz-executor978/5449 [ 66.144238] [ 66.145862] CPU: 1 PID: 5449 Comm: syz-executor978 Not tainted 4.19.0-rc5+ #259 [ 66.153397] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 66.162751] Call Trace: [ 66.165340] dump_stack+0x1c4/0x2b4 [ 66.168969] ? dump_stack_print_info.cold.2+0x52/0x52 [ 66.174157] ? printk+0xa7/0xcf [ 66.177442] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 66.182200] print_address_description.cold.8+0x9/0x1ff [ 66.187560] kasan_report.cold.9+0x242/0x309 [ 66.191960] ? ip_cmsg_recv_offset+0x12be/0x1390 [ 66.196828] __asan_report_load4_noabort+0x14/0x20 [ 66.201764] ip_cmsg_recv_offset+0x12be/0x1390 [ 66.206355] ? ip_send_unicast_reply+0x1770/0x1770 [ 66.211284] ? _copy_to_iter+0x1540/0x1540 [ 66.215508] ? rcu_lockdep_current_cpu_online+0x1f0/0x2d0 [ 66.221030] ? rcu_dynticks_curr_cpu_in_eqs+0x9f/0x160 [ 66.226295] ? rcu_pm_notify+0xc0/0xc0 [ 66.230178] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 66.235713] ? skb_copy_datagram_iter+0x26e/0xc10 [ 66.240551] ? __sk_queue_drop_skb+0x1f0/0x1f0 [ 66.245135] ? rcu_read_unlock_special.part.39+0x11f0/0x11f0 [ 66.250919] ? kasan_check_read+0x11/0x20 [ 66.255057] raw_recvmsg+0x71d/0x8b0 [ 66.258774] ? raw_abort+0xa0/0xa0 [ 66.262301] ? aa_file_perm+0x490/0x1060 [ 66.266355] inet_recvmsg+0x181/0x6d0 [ 66.270145] ? aa_path_link+0x5e0/0x5e0 [ 66.274110] ? inet_sendpage+0x740/0x740 [ 66.278160] ? aa_sock_msg_perm.isra.12+0xba/0x160 [ 66.283081] ? apparmor_socket_recvmsg+0x29/0x30 [ 66.287835] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 66.293365] ? security_socket_recvmsg+0x9c/0xc0 [ 66.298112] ? inet_sendpage+0x740/0x740 [ 66.302164] sock_recvmsg+0xd0/0x110 [ 66.305867] sock_read_iter+0x39b/0x570 [ 66.309829] ? sock_recvmsg+0x110/0x110 [ 66.313859] do_iter_readv_writev+0x77c/0xa80 [ 66.318430] ? vfs_dedupe_file_range+0x670/0x670 [ 66.323184] ? rw_verify_area+0x118/0x360 [ 66.327320] do_iter_read+0x26e/0x650 [ 66.331109] ? dup_iter+0x270/0x270 [ 66.334739] vfs_readv+0x175/0x1c0 [ 66.338275] ? compat_rw_copy_check_uvector+0x440/0x440 [ 66.343710] ? __ia32_sys_getpeername+0xb0/0xb0 [ 66.348393] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 66.353919] ? __fdget_pos+0xde/0x200 [ 66.357710] ? __fdget_raw+0x20/0x20 [ 66.361413] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 66.366935] ? fput+0x130/0x1a0 [ 66.370213] do_readv+0x11a/0x310 [ 66.373655] ? vfs_readv+0x1c0/0x1c0 [ 66.377364] ? __bpf_trace_preemptirq_template+0x30/0x30 [ 66.382814] __x64_sys_readv+0x75/0xb0 [ 66.386699] do_syscall_64+0x1b9/0x820 [ 66.390649] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 66.396009] ? syscall_return_slowpath+0x5e0/0x5e0 [ 66.400932] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 66.405875] ? trace_hardirqs_on_caller+0x310/0x310 [ 66.410947] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 66.415975] ? prepare_exit_to_usermode+0x291/0x3b0 [ 66.420988] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 66.425827] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.431009] RIP: 0033:0x446af9 [ 66.434194] Code: e8 1c b4 02 00 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 2b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 66.453160] RSP: 002b:00007f576844bce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000013 [ 66.460872] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446af9 [ 66.468137] RDX: 0000000000000001 RSI: 0000000020000500 RDI: 0000000000000003 [ 66.475400] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 66.482659] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 66.489924] R13: 00007fffb5a90e1f R14: 00007f576844c9c0 R15: 00000000006dbd2c [ 66.497198] [ 66.498819] Allocated by task 5449: [ 66.502485] save_stack+0x43/0xd0 [ 66.506023] kasan_kmalloc+0xc7/0xe0 [ 66.509733] __kmalloc_node_track_caller+0x47/0x70 [ 66.514656] __kmalloc_reserve.isra.39+0x41/0xe0 [ 66.519400] __alloc_skb+0x155/0x770 [ 66.523099] __ip_append_data.isra.47+0x21d6/0x29b0 [ 66.528099] ip_append_data.part.48+0xef/0x170 [ 66.532664] ip_append_data+0x6d/0x90 [ 66.536451] raw_sendmsg+0x1220/0x4380 [ 66.540328] inet_sendmsg+0x1a1/0x690 [ 66.544116] sock_sendmsg+0xd5/0x120 [ 66.547812] __sys_sendto+0x3d7/0x670 [ 66.551603] __x64_sys_sendto+0xe1/0x1a0 [ 66.555653] do_syscall_64+0x1b9/0x820 [ 66.559525] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.564692] [ 66.566301] Freed by task 5449: [ 66.569568] save_stack+0x43/0xd0 [ 66.573007] __kasan_slab_free+0x102/0x150 [ 66.577222] kasan_slab_free+0xe/0x10 [ 66.581063] kfree+0xcf/0x230 [ 66.584236] skb_free_head+0x99/0xc0 [ 66.587943] pskb_expand_head+0x3bb/0x10f0 [ 66.592172] __pskb_pull_tail+0x156/0x1890 [ 66.596443] ip_cmsg_recv_offset+0x113b/0x1390 [ 66.601022] raw_recvmsg+0x71d/0x8b0 [ 66.604723] inet_recvmsg+0x181/0x6d0 [ 66.608508] sock_recvmsg+0xd0/0x110 [ 66.612203] sock_read_iter+0x39b/0x570 [ 66.616170] do_iter_readv_writev+0x77c/0xa80 [ 66.620709] do_iter_read+0x26e/0x650 [ 66.624619] vfs_readv+0x175/0x1c0 [ 66.628215] do_readv+0x11a/0x310 [ 66.631660] __x64_sys_readv+0x75/0xb0 [ 66.635535] do_syscall_64+0x1b9/0x820 [ 66.639416] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 66.644591] [ 66.646207] The buggy address belongs to the object at ffff8801c17ceac0 [ 66.646207] which belongs to the cache kmalloc-512 of size 512 [ 66.658861] The buggy address is located 32 bytes inside of [ 66.658861] 512-byte region [ffff8801c17ceac0, ffff8801c17cecc0) [ 66.670647] The buggy address belongs to the page: [ 66.675577] page:ffffea000705f380 count:1 mapcount:0 mapping:ffff8801da800940 index:0x0 [ 66.683711] flags: 0x2fffc0000000100(slab) [ 66.687941] raw: 02fffc0000000100 ffffea0006fc7288 ffffea0007137448 ffff8801da800940 [ 66.695818] raw: 0000000000000000 ffff8801c17ce0c0 0000000100000006 0000000000000000 [ 66.703687] page dumped because: kasan: bad access detected [ 66.709379] [ 66.710996] Memory state around the buggy address: [ 66.715988] ffff8801c17ce980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 66.723349] ffff8801c17cea00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 66.730707] >ffff8801c17cea80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 66.738117] ^ [ 66.744647] ffff8801c17ceb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 66.752002] ffff8801c17ceb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 66.759343] ================================================================== [ 66.766679] Disabling lock debugging due to kernel taint [ 66.772475] Kernel panic - not syncing: panic_on_warn set ... [ 66.772475] [ 66.779837] CPU: 1 PID: 5449 Comm: syz-executor978 Tainted: G B 4.19.0-rc5+ #259 [ 66.788699] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 66.798038] Call Trace: [ 66.800616] dump_stack+0x1c4/0x2b4 [ 66.804232] ? dump_stack_print_info.cold.2+0x52/0x52 [ 66.809414] panic+0x238/0x4e7 [ 66.812590] ? add_taint.cold.5+0x16/0x16 [ 66.816771] ? preempt_schedule+0x4d/0x60 [ 66.820914] ? ___preempt_schedule+0x16/0x18 [ 66.825306] ? trace_hardirqs_on+0xb4/0x310 [ 66.830100] kasan_end_report+0x47/0x4f [ 66.834109] kasan_report.cold.9+0x76/0x309 [ 66.838431] ? ip_cmsg_recv_offset+0x12be/0x1390 [ 66.843278] __asan_report_load4_noabort+0x14/0x20 [ 66.848195] ip_cmsg_recv_offset+0x12be/0x1390 [ 66.852765] ? ip_send_unicast_reply+0x1770/0x1770 [ 66.857681] ? _copy_to_iter+0x1540/0x1540 [ 66.861902] ? rcu_lockdep_current_cpu_online+0x1f0/0x2d0 [ 66.867423] ? rcu_dynticks_curr_cpu_in_eqs+0x9f/0x160 [ 66.872691] ? rcu_pm_notify+0xc0/0xc0 [ 66.876617] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 66.882150] ? skb_copy_datagram_iter+0x26e/0xc10 [ 66.886990] ? __sk_queue_drop_skb+0x1f0/0x1f0 [ 66.891569] ? rcu_read_unlock_special.part.39+0x11f0/0x11f0 [ 66.897357] ? kasan_check_read+0x11/0x20 [ 66.901495] raw_recvmsg+0x71d/0x8b0 [ 66.905211] ? raw_abort+0xa0/0xa0 [ 66.908827] ? aa_file_perm+0x490/0x1060 [ 66.912929] inet_recvmsg+0x181/0x6d0 [ 66.916727] ? aa_path_link+0x5e0/0x5e0 [ 66.920773] ? inet_sendpage+0x740/0x740 [ 66.924829] ? aa_sock_msg_perm.isra.12+0xba/0x160 [ 66.929751] ? apparmor_socket_recvmsg+0x29/0x30 [ 66.934492] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 66.940015] ? security_socket_recvmsg+0x9c/0xc0 [ 66.944812] ? inet_sendpage+0x740/0x740 [ 66.948994] sock_recvmsg+0xd0/0x110 [ 66.952712] sock_read_iter+0x39b/0x570 [ 66.956720] ? sock_recvmsg+0x110/0x110 [ 66.960695] do_iter_readv_writev+0x77c/0xa80 [ 66.965178] ? vfs_dedupe_file_range+0x670/0x670 [ 66.969917] ? rw_verify_area+0x118/0x360 [ 66.974056] do_iter_read+0x26e/0x650 [ 66.977952] ? dup_iter+0x270/0x270 [ 66.981577] vfs_readv+0x175/0x1c0 [ 66.985219] ? compat_rw_copy_check_uvector+0x440/0x440 [ 66.990643] ? __ia32_sys_getpeername+0xb0/0xb0 [ 66.995313] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 67.000839] ? __fdget_pos+0xde/0x200 [ 67.004623] ? __fdget_raw+0x20/0x20 [ 67.008324] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 67.013844] ? fput+0x130/0x1a0 [ 67.017118] do_readv+0x11a/0x310 [ 67.020607] ? vfs_readv+0x1c0/0x1c0 [ 67.024360] ? __bpf_trace_preemptirq_template+0x30/0x30 [ 67.029806] __x64_sys_readv+0x75/0xb0 [ 67.033682] do_syscall_64+0x1b9/0x820 [ 67.037554] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 67.042951] ? syscall_return_slowpath+0x5e0/0x5e0 [ 67.047895] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 67.052727] ? trace_hardirqs_on_caller+0x310/0x310 [ 67.057725] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 67.062724] ? prepare_exit_to_usermode+0x291/0x3b0 [ 67.067771] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 67.072606] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 67.077777] RIP: 0033:0x446af9 [ 67.080957] Code: e8 1c b4 02 00 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 2b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 67.099853] RSP: 002b:00007f576844bce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000013 [ 67.107549] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446af9 [ 67.114868] RDX: 0000000000000001 RSI: 0000000020000500 RDI: 0000000000000003 [ 67.122128] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 67.129426] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 67.136684] R13: 00007fffb5a90e1f R14: 00007f576844c9c0 R15: 00000000006dbd2c [ 67.144904] Kernel Offset: disabled [ 67.148533] Rebooting in 86400 seconds..