[....] Starting enhanced syslogd: rsyslogd[ 13.338313] audit: type=1400 audit(1516072592.110:5): avc: denied { syslog } for pid=3503 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 20.179896] audit: type=1400 audit(1516072598.951:6): avc: denied { map } for pid=3642 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Warning: Permanently added '10.128.15.243' (ECDSA) to the list of known hosts. executing program [ 37.091041] audit: type=1400 audit(1516072615.862:7): avc: denied { map } for pid=3660 comm="syzkaller898908" path="/root/syzkaller898908135" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 37.140549] TCP: request_sock_TCP: Possible SYN flooding on port 20000. Sending cookies. Check SNMP counters. [ 37.156539] ================================================================== [ 37.163935] BUG: KASAN: use-after-free in tls_sk_proto_close+0x7a0/0x800 [ 37.170757] Read of size 8 at addr ffff8801d53eec88 by task syzkaller898908/3661 [ 37.178259] [ 37.179860] CPU: 0 PID: 3661 Comm: syzkaller898908 Not tainted 4.15.0-rc8+ #173 [ 37.187273] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.196595] Call Trace: [ 37.199164] dump_stack+0x194/0x257 [ 37.202765] ? arch_local_irq_restore+0x53/0x53 [ 37.207405] ? show_regs_print_info+0x18/0x18 [ 37.211965] ? mark_held_locks+0xaf/0x100 [ 37.216085] ? do_raw_spin_trylock+0x190/0x190 [ 37.220641] ? tls_sk_proto_close+0x7a0/0x800 [ 37.225113] print_address_description+0x73/0x250 [ 37.229931] ? tls_sk_proto_close+0x7a0/0x800 [ 37.234399] kasan_report+0x25b/0x340 [ 37.238175] __asan_report_load8_noabort+0x14/0x20 [ 37.243072] tls_sk_proto_close+0x7a0/0x800 [ 37.247363] ? lock_release+0xa40/0xa40 [ 37.251397] ? __dentry_kill+0x487/0x6d0 [ 37.255435] ? tls_write_space+0x2c0/0x2c0 [ 37.259650] ? locks_remove_file+0x3fa/0x5a0 [ 37.264032] ? fcntl_setlk+0x10c0/0x10c0 [ 37.268063] ? fsnotify+0x7b3/0x1140 [ 37.271759] ? ip_mc_drop_socket+0x1ce/0x230 [ 37.276144] inet_release+0xed/0x1c0 [ 37.279837] sock_release+0x8d/0x1e0 [ 37.283526] ? sock_alloc_file+0x560/0x560 [ 37.287730] sock_close+0x16/0x20 [ 37.291154] __fput+0x327/0x7e0 [ 37.294409] ? fput+0x140/0x140 [ 37.297663] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 37.303526] ? _raw_spin_unlock_irq+0x27/0x70 [ 37.307999] ____fput+0x15/0x20 [ 37.311252] task_work_run+0x199/0x270 [ 37.315120] ? task_work_cancel+0x210/0x210 [ 37.319414] ? _raw_spin_unlock+0x22/0x30 [ 37.323533] ? switch_task_namespaces+0x87/0xc0 [ 37.328181] do_exit+0x9bb/0x1ad0 [ 37.331610] ? find_held_lock+0x35/0x1d0 [ 37.335648] ? mm_update_next_owner+0x930/0x930 [ 37.340290] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 37.345547] ? lock_downgrade+0x980/0x980 [ 37.349672] ? __unqueue_futex+0x1c0/0x290 [ 37.353881] ? lock_release+0xa40/0xa40 [ 37.357830] ? fault_in_user_writeable+0x90/0x90 [ 37.362558] ? do_raw_spin_trylock+0x190/0x190 [ 37.367119] ? futex_wake+0x680/0x680 [ 37.370898] ? drop_futex_key_refs.isra.12+0x63/0xb0 [ 37.375974] ? futex_wait+0x6a9/0x9a0 [ 37.379755] ? check_noncircular+0x20/0x20 [ 37.383971] ? wake_up_q+0x8a/0xe0 [ 37.387486] ? drop_futex_key_refs.isra.12+0x63/0xb0 [ 37.392567] ? futex_wake+0x2ca/0x680 [ 37.396352] ? find_held_lock+0x35/0x1d0 [ 37.400394] ? get_signal+0x7ae/0x16c0 [ 37.404255] ? lock_downgrade+0x980/0x980 [ 37.408385] do_group_exit+0x149/0x400 [ 37.412245] ? do_raw_spin_trylock+0x190/0x190 [ 37.416796] ? SyS_exit+0x30/0x30 [ 37.420223] ? _raw_spin_unlock_irq+0x27/0x70 [ 37.424692] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 37.429688] get_signal+0x73f/0x16c0 [ 37.433385] ? ptrace_notify+0x130/0x130 [ 37.437421] ? check_noncircular+0x20/0x20 [ 37.441630] ? __fd_install+0x288/0x740 [ 37.445584] ? __handle_mm_fault+0x80e/0x3ce0 [ 37.450063] ? check_noncircular+0x20/0x20 [ 37.454266] ? __pmd_alloc+0x4e0/0x4e0 [ 37.458124] ? __might_sleep+0x95/0x190 [ 37.462075] do_signal+0x90/0x1eb0 [ 37.465601] ? handle_mm_fault+0x248/0x8d0 [ 37.469812] ? setup_sigcontext+0x7d0/0x7d0 [ 37.474100] ? find_held_lock+0x35/0x1d0 [ 37.478137] ? __do_page_fault+0x5f7/0xc90 [ 37.482342] ? lock_downgrade+0x980/0x980 [ 37.486467] ? handle_mm_fault+0x410/0x8d0 [ 37.490670] ? down_read_trylock+0xdb/0x170 [ 37.494961] ? __do_page_fault+0x32d/0xc90 [ 37.499173] ? exit_to_usermode_loop+0x8c/0x310 [ 37.503820] exit_to_usermode_loop+0x214/0x310 [ 37.508378] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 37.513896] ? do_fast_syscall_32+0x156/0xf9d [ 37.518376] do_fast_syscall_32+0xbfd/0xf9d [ 37.522673] ? do_int80_syscall_32+0x9d0/0x9d0 [ 37.527233] ? syscall_return_slowpath+0x2ad/0x550 [ 37.532135] ? prepare_exit_to_usermode+0x340/0x340 [ 37.537127] ? sysret32_from_system_call+0x5/0x3b [ 37.541947] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.546776] entry_SYSENTER_compat+0x54/0x63 [ 37.551152] RIP: 0023:0xf7f5fc79 [ 37.554485] RSP: 002b:00000000f7f5b1ec EFLAGS: 00000296 ORIG_RAX: 00000000000000f0 [ 37.562163] RAX: fffffffffffffe00 RBX: 00000000080f9fe4 RCX: 0000000000000000 [ 37.569405] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000080f9fe4 [ 37.576648] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 37.583887] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 37.591128] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 37.598384] [ 37.599984] Allocated by task 3661: [ 37.603853] save_stack+0x43/0xd0 [ 37.607278] kasan_kmalloc+0xad/0xe0 [ 37.610966] kmem_cache_alloc_trace+0x136/0x750 [ 37.615608] tls_init+0x4b/0x240 [ 37.618943] tcp_set_ulp+0x159/0x3e0 [ 37.622625] do_tcp_setsockopt.isra.38+0x316/0x2130 [ 37.627619] compat_tcp_setsockopt+0x67/0x70 [ 37.632001] compat_sock_common_setsockopt+0xb2/0x140 [ 37.637164] compat_SyS_setsockopt+0x17c/0x410 [ 37.641812] do_fast_syscall_32+0x3ee/0xf9d [ 37.646112] entry_SYSENTER_compat+0x54/0x63 [ 37.650493] [ 37.652089] Freed by task 3661: [ 37.655339] save_stack+0x43/0xd0 [ 37.658763] kasan_slab_free+0x71/0xc0 [ 37.662632] kfree+0xd6/0x260 [ 37.665710] tls_sk_proto_close+0x4bf/0x800 [ 37.670004] inet_release+0xed/0x1c0 [ 37.673704] sock_release+0x8d/0x1e0 [ 37.677389] sock_close+0x16/0x20 [ 37.680820] __fput+0x327/0x7e0 [ 37.684069] ____fput+0x15/0x20 [ 37.687323] task_work_run+0x199/0x270 [ 37.691188] do_exit+0x9bb/0x1ad0 [ 37.694609] do_group_exit+0x149/0x400 [ 37.698466] get_signal+0x73f/0x16c0 [ 37.702152] do_signal+0x90/0x1eb0 [ 37.705665] exit_to_usermode_loop+0x214/0x310 [ 37.710223] do_fast_syscall_32+0xbfd/0xf9d [ 37.714514] entry_SYSENTER_compat+0x54/0x63 [ 37.718901] [ 37.720502] The buggy address belongs to the object at ffff8801d53eec00 [ 37.720502] which belongs to the cache kmalloc-192 of size 192 [ 37.733381] The buggy address is located 136 bytes inside of [ 37.733381] 192-byte region [ffff8801d53eec00, ffff8801d53eecc0) [ 37.745224] The buggy address belongs to the page: [ 37.750238] page:ffffea000754fb80 count:1 mapcount:0 mapping:ffff8801d53ee000 index:0x0 [ 37.758350] flags: 0x2fffc0000000100(slab) [ 37.762554] raw: 02fffc0000000100 ffff8801d53ee000 0000000000000000 0000000100000010 [ 37.770406] raw: ffffea00074cefe0 ffffea00076509e0 ffff8801dac00040 0000000000000000 [ 37.778251] page dumped because: kasan: bad access detected [ 37.783946] [ 37.785543] Memory state around the buggy address: [ 37.790439] ffff8801d53eeb80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 37.797766] ffff8801d53eec00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.805096] >ffff8801d53eec80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 37.812440] ^ [ 37.816037] ffff8801d53eed00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.823366] ffff8801d53eed80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 37.830693] ================================================================== [ 37.838022] Disabling lock debugging due to kernel taint [ 37.843540] Kernel panic - not syncing: panic_on_warn set ... [ 37.843540] [ 37.850879] CPU: 0 PID: 3661 Comm: syzkaller898908 Tainted: G B 4.15.0-rc8+ #173 [ 37.859607] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.869020] Call Trace: [ 37.871588] dump_stack+0x194/0x257 [ 37.875187] ? arch_local_irq_restore+0x53/0x53 [ 37.879916] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 37.884648] ? vsnprintf+0x1ed/0x1900 [ 37.888417] ? tls_sk_proto_close+0x6c0/0x800 [ 37.892882] panic+0x1e4/0x41c [ 37.896041] ? refcount_error_report+0x214/0x214 [ 37.900764] ? add_taint+0x1c/0x50 [ 37.904277] ? add_taint+0x1c/0x50 [ 37.907783] ? tls_sk_proto_close+0x7a0/0x800 [ 37.912245] kasan_end_report+0x50/0x50 [ 37.916185] kasan_report+0x144/0x340 [ 37.919954] __asan_report_load8_noabort+0x14/0x20 [ 37.924848] tls_sk_proto_close+0x7a0/0x800 [ 37.929137] ? lock_release+0xa40/0xa40 [ 37.933079] ? __dentry_kill+0x487/0x6d0 [ 37.937106] ? tls_write_space+0x2c0/0x2c0 [ 37.941312] ? locks_remove_file+0x3fa/0x5a0 [ 37.945687] ? fcntl_setlk+0x10c0/0x10c0 [ 37.949713] ? fsnotify+0x7b3/0x1140 [ 37.953395] ? ip_mc_drop_socket+0x1ce/0x230 [ 37.957778] inet_release+0xed/0x1c0 [ 37.961469] sock_release+0x8d/0x1e0 [ 37.965147] ? sock_alloc_file+0x560/0x560 [ 37.969345] sock_close+0x16/0x20 [ 37.972776] __fput+0x327/0x7e0 [ 37.976025] ? fput+0x140/0x140 [ 37.979275] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 37.985130] ? _raw_spin_unlock_irq+0x27/0x70 [ 37.989609] ____fput+0x15/0x20 [ 37.992857] task_work_run+0x199/0x270 [ 37.996722] ? task_work_cancel+0x210/0x210 [ 38.001012] ? _raw_spin_unlock+0x22/0x30 [ 38.005135] ? switch_task_namespaces+0x87/0xc0 [ 38.009774] do_exit+0x9bb/0x1ad0 [ 38.013196] ? find_held_lock+0x35/0x1d0 [ 38.017223] ? mm_update_next_owner+0x930/0x930 [ 38.021864] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 38.027022] ? lock_downgrade+0x980/0x980 [ 38.031138] ? __unqueue_futex+0x1c0/0x290 [ 38.035341] ? lock_release+0xa40/0xa40 [ 38.039299] ? fault_in_user_writeable+0x90/0x90 [ 38.044024] ? do_raw_spin_trylock+0x190/0x190 [ 38.048576] ? futex_wake+0x680/0x680 [ 38.052346] ? drop_futex_key_refs.isra.12+0x63/0xb0 [ 38.057501] ? futex_wait+0x6a9/0x9a0 [ 38.061273] ? check_noncircular+0x20/0x20 [ 38.065500] ? wake_up_q+0x8a/0xe0 [ 38.069014] ? drop_futex_key_refs.isra.12+0x63/0xb0 [ 38.074082] ? futex_wake+0x2ca/0x680 [ 38.077855] ? find_held_lock+0x35/0x1d0 [ 38.081894] ? get_signal+0x7ae/0x16c0 [ 38.085751] ? lock_downgrade+0x980/0x980 [ 38.089881] do_group_exit+0x149/0x400 [ 38.093738] ? do_raw_spin_trylock+0x190/0x190 [ 38.098288] ? SyS_exit+0x30/0x30 [ 38.101710] ? _raw_spin_unlock_irq+0x27/0x70 [ 38.106173] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 38.111157] get_signal+0x73f/0x16c0 [ 38.114843] ? ptrace_notify+0x130/0x130 [ 38.118871] ? check_noncircular+0x20/0x20 [ 38.123074] ? __fd_install+0x288/0x740 [ 38.127019] ? __handle_mm_fault+0x80e/0x3ce0 [ 38.131483] ? check_noncircular+0x20/0x20 [ 38.135683] ? __pmd_alloc+0x4e0/0x4e0 [ 38.139537] ? __might_sleep+0x95/0x190 [ 38.143491] do_signal+0x90/0x1eb0 [ 38.147003] ? handle_mm_fault+0x248/0x8d0 [ 38.151214] ? setup_sigcontext+0x7d0/0x7d0 [ 38.155514] ? find_held_lock+0x35/0x1d0 [ 38.160247] ? __do_page_fault+0x5f7/0xc90 [ 38.164450] ? lock_downgrade+0x980/0x980 [ 38.168568] ? handle_mm_fault+0x410/0x8d0 [ 38.172766] ? down_read_trylock+0xdb/0x170 [ 38.177052] ? __do_page_fault+0x32d/0xc90 [ 38.181257] ? exit_to_usermode_loop+0x8c/0x310 [ 38.185896] exit_to_usermode_loop+0x214/0x310 [ 38.190449] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 38.195956] ? do_fast_syscall_32+0x156/0xf9d [ 38.200421] do_fast_syscall_32+0xbfd/0xf9d [ 38.204714] ? do_int80_syscall_32+0x9d0/0x9d0 [ 38.209266] ? syscall_return_slowpath+0x2ad/0x550 [ 38.214164] ? prepare_exit_to_usermode+0x340/0x340 [ 38.219149] ? sysret32_from_system_call+0x5/0x3b [ 38.223961] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.228773] entry_SYSENTER_compat+0x54/0x63 [ 38.233146] RIP: 0023:0xf7f5fc79 [ 38.236476] RSP: 002b:00000000f7f5b1ec EFLAGS: 00000296 ORIG_RAX: 00000000000000f0 [ 38.244158] RAX: fffffffffffffe00 RBX: 00000000080f9fe4 RCX: 0000000000000000 [ 38.251395] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000080f9fe4 [ 38.258633] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 38.265875] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 38.273110] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 38.280772] Dumping ftrace buffer: [ 38.284287] (ftrace buffer empty) [ 38.287965] Kernel Offset: disabled [ 38.291558] Rebooting in 86400 seconds..