[....] Starting enhanced syslogd: rsyslogd[ 12.754888] audit: type=1400 audit(1516060711.080:5): avc: denied { syslog } for pid=3505 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: [ 16.861463] audit: type=1400 audit(1516060715.187:6): avc: denied { map } for pid=3645 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.0.23' (ECDSA) to the list of known hosts. executing program [ 31.457843] audit: type=1400 audit(1516060729.783:7): avc: denied { map } for pid=3662 comm="syzkaller186931" path="/root/syzkaller186931826" 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 [ 31.507054] TCP: request_sock_TCP: Possible SYN flooding on port 20000. Sending cookies. Check SNMP counters. [ 31.523941] ================================================================== [ 31.531349] BUG: KASAN: use-after-free in tls_sk_proto_close+0x7a0/0x800 [ 31.538182] Read of size 8 at addr ffff8801d3329c88 by task syzkaller186931/3663 [ 31.545694] [ 31.547307] CPU: 1 PID: 3663 Comm: syzkaller186931 Not tainted 4.15.0-rc7+ #190 [ 31.554743] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.564073] Call Trace: [ 31.566650] dump_stack+0x194/0x257 [ 31.570280] ? arch_local_irq_restore+0x53/0x53 [ 31.574965] ? show_regs_print_info+0x18/0x18 [ 31.579447] ? mark_held_locks+0xaf/0x100 [ 31.583569] ? do_raw_spin_trylock+0x190/0x190 [ 31.588128] ? tls_sk_proto_close+0x7a0/0x800 [ 31.592605] print_address_description+0x73/0x250 [ 31.597436] ? tls_sk_proto_close+0x7a0/0x800 [ 31.601907] kasan_report+0x25b/0x340 [ 31.605685] __asan_report_load8_noabort+0x14/0x20 [ 31.610595] tls_sk_proto_close+0x7a0/0x800 [ 31.614904] ? lock_release+0xa40/0xa40 [ 31.618862] ? __dentry_kill+0x487/0x6d0 [ 31.622904] ? tls_write_space+0x2c0/0x2c0 [ 31.627122] ? locks_remove_file+0x3fa/0x5a0 [ 31.631518] ? fcntl_setlk+0x10c0/0x10c0 [ 31.635563] ? fsnotify+0x7b3/0x1140 [ 31.639255] ? ip_mc_drop_socket+0x1ce/0x230 [ 31.643669] inet_release+0xed/0x1c0 [ 31.647365] sock_release+0x8d/0x1e0 [ 31.651053] ? sock_alloc_file+0x560/0x560 [ 31.655259] sock_close+0x16/0x20 [ 31.658691] __fput+0x327/0x7e0 [ 31.661960] ? fput+0x140/0x140 [ 31.665240] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 31.671106] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.675583] ____fput+0x15/0x20 [ 31.678858] task_work_run+0x199/0x270 [ 31.682727] ? task_work_cancel+0x210/0x210 [ 31.687028] ? _raw_spin_unlock+0x22/0x30 [ 31.691155] ? switch_task_namespaces+0x87/0xc0 [ 31.695899] do_exit+0x9bb/0x1ad0 [ 31.699336] ? mm_update_next_owner+0x930/0x930 [ 31.703999] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.709177] ? __might_sleep+0x95/0x190 [ 31.713140] ? find_held_lock+0x35/0x1d0 [ 31.717187] ? futex_wait+0x402/0x9a0 [ 31.720968] ? lock_downgrade+0x980/0x980 [ 31.725114] ? __unqueue_futex+0x1c0/0x290 [ 31.729336] ? lock_release+0xa40/0xa40 [ 31.733286] ? fault_in_user_writeable+0x90/0x90 [ 31.738025] ? do_raw_spin_trylock+0x190/0x190 [ 31.742581] ? futex_wake+0x680/0x680 [ 31.746359] ? check_noncircular+0x20/0x20 [ 31.750578] ? drop_futex_key_refs.isra.12+0x63/0xb0 [ 31.755666] ? futex_wait+0x6a9/0x9a0 [ 31.759456] ? find_held_lock+0x35/0x1d0 [ 31.763509] ? get_signal+0x7ae/0x16c0 [ 31.767380] ? lock_downgrade+0x980/0x980 [ 31.771519] do_group_exit+0x149/0x400 [ 31.775390] ? do_raw_spin_trylock+0x190/0x190 [ 31.779948] ? SyS_exit+0x30/0x30 [ 31.783379] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.787851] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 31.792846] get_signal+0x73f/0x16c0 [ 31.796545] ? ptrace_notify+0x130/0x130 [ 31.800589] ? exit_robust_list+0x240/0x240 [ 31.804900] ? find_held_lock+0x35/0x1d0 [ 31.808945] ? handle_mm_fault+0x248/0x8d0 [ 31.813167] ? find_held_lock+0x35/0x1d0 [ 31.817226] do_signal+0x90/0x1eb0 [ 31.820833] ? __do_page_fault+0x5f7/0xc90 [ 31.825051] ? lock_downgrade+0x980/0x980 [ 31.829200] ? setup_sigcontext+0x7d0/0x7d0 [ 31.833502] ? handle_mm_fault+0x410/0x8d0 [ 31.837711] ? down_read_trylock+0xdb/0x170 [ 31.842005] ? __do_page_fault+0x32d/0xc90 [ 31.846214] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 31.850782] ? vmacache_find+0x5f/0x280 [ 31.854742] ? up_read+0x1a/0x40 [ 31.858083] ? __do_page_fault+0x3d6/0xc90 [ 31.862300] ? exit_to_usermode_loop+0x8c/0x310 [ 31.866950] exit_to_usermode_loop+0x214/0x310 [ 31.871511] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 31.877041] syscall_return_slowpath+0x490/0x550 [ 31.881776] ? prepare_exit_to_usermode+0x340/0x340 [ 31.886775] ? entry_SYSCALL_64_fastpath+0x6d/0x9a [ 31.891693] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 31.896706] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 31.901459] entry_SYSCALL_64_fastpath+0x98/0x9a [ 31.906189] RIP: 0033:0x4457a9 [ 31.909352] RSP: 002b:00007f715c685db8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 31.917032] RAX: fffffffffffffe00 RBX: 00000000006dac24 RCX: 00000000004457a9 [ 31.924295] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000006dac24 [ 31.931542] RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000 [ 31.938784] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 31.946027] R13: 00007fff9cf582af R14: 00007f715c6869c0 R15: 0000000000000001 [ 31.953297] [ 31.954901] Allocated by task 3663: [ 31.958516] save_stack+0x43/0xd0 [ 31.961942] kasan_kmalloc+0xad/0xe0 [ 31.965633] kmem_cache_alloc_trace+0x136/0x750 [ 31.970288] tls_init+0x4b/0x240 [ 31.973631] tcp_set_ulp+0x159/0x3e0 [ 31.977324] do_tcp_setsockopt.isra.37+0x316/0x2130 [ 31.982311] tcp_setsockopt+0xb0/0xd0 [ 31.986086] sock_common_setsockopt+0x95/0xd0 [ 31.990567] SyS_setsockopt+0x189/0x360 [ 31.994515] entry_SYSCALL_64_fastpath+0x23/0x9a [ 31.999238] [ 32.000841] Freed by task 3663: [ 32.004098] save_stack+0x43/0xd0 [ 32.007524] kasan_slab_free+0x71/0xc0 [ 32.011382] kfree+0xd6/0x260 [ 32.014465] tls_sk_proto_close+0x4bf/0x800 [ 32.018759] inet_release+0xed/0x1c0 [ 32.022445] sock_release+0x8d/0x1e0 [ 32.026131] sock_close+0x16/0x20 [ 32.029563] __fput+0x327/0x7e0 [ 32.032816] ____fput+0x15/0x20 [ 32.036080] task_work_run+0x199/0x270 [ 32.039940] do_exit+0x9bb/0x1ad0 [ 32.043365] do_group_exit+0x149/0x400 [ 32.047225] get_signal+0x73f/0x16c0 [ 32.050912] do_signal+0x90/0x1eb0 [ 32.054424] exit_to_usermode_loop+0x214/0x310 [ 32.058979] syscall_return_slowpath+0x490/0x550 [ 32.063709] entry_SYSCALL_64_fastpath+0x98/0x9a [ 32.068432] [ 32.070033] The buggy address belongs to the object at ffff8801d3329c00 [ 32.070033] which belongs to the cache kmalloc-192 of size 192 [ 32.082670] The buggy address is located 136 bytes inside of [ 32.082670] 192-byte region [ffff8801d3329c00, ffff8801d3329cc0) [ 32.094536] The buggy address belongs to the page: [ 32.099444] page:ffffea00074cca40 count:1 mapcount:0 mapping:ffff8801d3329000 index:0xffff8801d3329d00 [ 32.108863] flags: 0x2fffc0000000100(slab) [ 32.113070] raw: 02fffc0000000100 ffff8801d3329000 ffff8801d3329d00 000000010000000e [ 32.120937] raw: ffffea00075198a0 ffffea0007474160 ffff8801dac00040 0000000000000000 [ 32.128788] page dumped because: kasan: bad access detected [ 32.134469] [ 32.136067] Memory state around the buggy address: [ 32.140967] ffff8801d3329b80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 32.148297] ffff8801d3329c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.155628] >ffff8801d3329c80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 32.162963] ^ [ 32.166574] ffff8801d3329d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.173907] ffff8801d3329d80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 32.181249] ================================================================== [ 32.188587] Disabling lock debugging due to kernel taint [ 32.194078] Kernel panic - not syncing: panic_on_warn set ... [ 32.194078] [ 32.201418] CPU: 1 PID: 3663 Comm: syzkaller186931 Tainted: G B 4.15.0-rc7+ #190 [ 32.210136] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.219470] Call Trace: [ 32.222035] dump_stack+0x194/0x257 [ 32.225635] ? arch_local_irq_restore+0x53/0x53 [ 32.230283] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.235019] ? vsnprintf+0x1ed/0x1900 [ 32.238795] ? tls_sk_proto_close+0x6f0/0x800 [ 32.243273] panic+0x1e4/0x41c [ 32.246437] ? refcount_error_report+0x214/0x214 [ 32.251165] ? add_taint+0x1c/0x50 [ 32.254677] ? add_taint+0x1c/0x50 [ 32.258194] ? tls_sk_proto_close+0x7a0/0x800 [ 32.262665] kasan_end_report+0x50/0x50 [ 32.266611] kasan_report+0x144/0x340 [ 32.270388] __asan_report_load8_noabort+0x14/0x20 [ 32.275289] tls_sk_proto_close+0x7a0/0x800 [ 32.279605] ? lock_release+0xa40/0xa40 [ 32.283561] ? __dentry_kill+0x487/0x6d0 [ 32.287603] ? tls_write_space+0x2c0/0x2c0 [ 32.292610] ? locks_remove_file+0x3fa/0x5a0 [ 32.296991] ? fcntl_setlk+0x10c0/0x10c0 [ 32.301025] ? fsnotify+0x7b3/0x1140 [ 32.304715] ? ip_mc_drop_socket+0x1ce/0x230 [ 32.309102] inet_release+0xed/0x1c0 [ 32.312796] sock_release+0x8d/0x1e0 [ 32.316491] ? sock_alloc_file+0x560/0x560 [ 32.320694] sock_close+0x16/0x20 [ 32.324127] __fput+0x327/0x7e0 [ 32.327407] ? fput+0x140/0x140 [ 32.330668] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 32.336534] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.341002] ____fput+0x15/0x20 [ 32.344257] task_work_run+0x199/0x270 [ 32.348116] ? task_work_cancel+0x210/0x210 [ 32.352410] ? _raw_spin_unlock+0x22/0x30 [ 32.356530] ? switch_task_namespaces+0x87/0xc0 [ 32.361171] do_exit+0x9bb/0x1ad0 [ 32.364600] ? mm_update_next_owner+0x930/0x930 [ 32.369242] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 32.374402] ? __might_sleep+0x95/0x190 [ 32.378356] ? find_held_lock+0x35/0x1d0 [ 32.382396] ? futex_wait+0x402/0x9a0 [ 32.386166] ? lock_downgrade+0x980/0x980 [ 32.390283] ? __unqueue_futex+0x1c0/0x290 [ 32.394487] ? lock_release+0xa40/0xa40 [ 32.398431] ? fault_in_user_writeable+0x90/0x90 [ 32.403158] ? do_raw_spin_trylock+0x190/0x190 [ 32.407710] ? futex_wake+0x680/0x680 [ 32.411481] ? check_noncircular+0x20/0x20 [ 32.415690] ? drop_futex_key_refs.isra.12+0x63/0xb0 [ 32.420774] ? futex_wait+0x6a9/0x9a0 [ 32.424555] ? find_held_lock+0x35/0x1d0 [ 32.428592] ? get_signal+0x7ae/0x16c0 [ 32.432455] ? lock_downgrade+0x980/0x980 [ 32.436590] do_group_exit+0x149/0x400 [ 32.440451] ? do_raw_spin_trylock+0x190/0x190 [ 32.445020] ? SyS_exit+0x30/0x30 [ 32.448444] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.452910] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.457900] get_signal+0x73f/0x16c0 [ 32.461591] ? ptrace_notify+0x130/0x130 [ 32.465625] ? exit_robust_list+0x240/0x240 [ 32.469917] ? find_held_lock+0x35/0x1d0 [ 32.473954] ? handle_mm_fault+0x248/0x8d0 [ 32.478164] ? find_held_lock+0x35/0x1d0 [ 32.482200] do_signal+0x90/0x1eb0 [ 32.485712] ? __do_page_fault+0x5f7/0xc90 [ 32.489918] ? lock_downgrade+0x980/0x980 [ 32.494046] ? setup_sigcontext+0x7d0/0x7d0 [ 32.498340] ? handle_mm_fault+0x410/0x8d0 [ 32.502554] ? down_read_trylock+0xdb/0x170 [ 32.506845] ? __do_page_fault+0x32d/0xc90 [ 32.511070] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 32.515620] ? vmacache_find+0x5f/0x280 [ 32.519570] ? up_read+0x1a/0x40 [ 32.522908] ? __do_page_fault+0x3d6/0xc90 [ 32.527124] ? exit_to_usermode_loop+0x8c/0x310 [ 32.531767] exit_to_usermode_loop+0x214/0x310 [ 32.536323] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 32.541838] syscall_return_slowpath+0x490/0x550 [ 32.546566] ? prepare_exit_to_usermode+0x340/0x340 [ 32.551556] ? entry_SYSCALL_64_fastpath+0x6d/0x9a [ 32.556456] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.561444] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.566176] entry_SYSCALL_64_fastpath+0x98/0x9a [ 32.570912] RIP: 0033:0x4457a9 [ 32.574070] RSP: 002b:00007f715c685db8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 32.581753] RAX: fffffffffffffe00 RBX: 00000000006dac24 RCX: 00000000004457a9 [ 32.589007] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000006dac24 [ 32.596247] RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000 [ 32.603497] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 32.610750] R13: 00007fff9cf582af R14: 00007f715c6869c0 R15: 0000000000000001 [ 32.618362] Dumping ftrace buffer: [ 32.621871] (ftrace buffer empty) [ 32.625562] Kernel Offset: disabled [ 32.629160] Rebooting in 86400 seconds..