[....] Starting enhanced syslogd: rsyslogd[ 12.046724] audit: type=1400 audit(1514795876.921:5): avc: denied { syslog } for pid=3345 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: [ 18.193629] audit: type=1400 audit(1514795883.068:6): avc: denied { map } for pid=3485 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.16' (ECDSA) to the list of known hosts. executing program [ 24.524035] audit: type=1400 audit(1514795889.398:7): avc: denied { map } for pid=3499 comm="syzkaller432666" path="/root/syzkaller432666103" 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 [ 24.530253] ================================================================== [ 24.530267] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 24.530273] Read of size 8 at addr ffff8801c70603f0 by task syzkaller432666/3499 [ 24.530274] [ 24.530281] CPU: 1 PID: 3499 Comm: syzkaller432666 Not tainted 4.15.0-rc6+ #245 [ 24.530285] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.530287] Call Trace: [ 24.530297] dump_stack+0x194/0x257 [ 24.530304] ? arch_local_irq_restore+0x53/0x53 [ 24.530312] ? show_regs_print_info+0x18/0x18 [ 24.530318] ? print_irqtrace_events+0x270/0x270 [ 24.530325] ? __lock_acquire+0x664/0x3e00 [ 24.530331] ? __lock_acquire+0x3d4d/0x3e00 [ 24.530341] print_address_description+0x73/0x250 [ 24.530347] ? __lock_acquire+0x3d4d/0x3e00 [ 24.530353] kasan_report+0x25b/0x340 [ 24.530362] __asan_report_load8_noabort+0x14/0x20 [ 24.530368] __lock_acquire+0x3d4d/0x3e00 [ 24.530373] ? __lock_acquire+0x664/0x3e00 [ 24.530379] ? lock_downgrade+0x980/0x980 [ 24.530384] ? lock_downgrade+0x980/0x980 [ 24.530392] ? remove_wait_queue+0x81/0x350 [ 24.530401] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.530408] ? __lock_acquire+0x664/0x3e00 [ 24.530413] ? check_noncircular+0x20/0x20 [ 24.530425] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.530432] ? lock_acquire+0x1d5/0x580 [ 24.530437] ? lock_acquire+0x1d5/0x580 [ 24.530444] ? ep_free+0xf4/0x320 [ 24.530452] ? lock_release+0xa40/0xa40 [ 24.530459] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.530465] ? print_irqtrace_events+0x270/0x270 [ 24.530473] ? rcu_note_context_switch+0x710/0x710 [ 24.530480] ? __might_sleep+0x95/0x190 [ 24.530486] ? ep_free+0xf4/0x320 [ 24.530492] ? __mutex_lock+0x16f/0x1a80 [ 24.530497] ? ep_free+0xf4/0x320 [ 24.530504] ? print_irqtrace_events+0x270/0x270 [ 24.530509] ? ep_free+0xf4/0x320 [ 24.530517] lock_acquire+0x1d5/0x580 [ 24.530522] ? lock_acquire+0x1d5/0x580 [ 24.530528] ? remove_wait_queue+0x81/0x350 [ 24.530534] ? __lock_acquire+0x664/0x3e00 [ 24.530541] ? lock_release+0xa40/0xa40 [ 24.530550] ? lock_acquire+0x1d5/0x580 [ 24.530556] ? lock_acquire+0x1d5/0x580 [ 24.530562] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 24.530569] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.530575] ? remove_wait_queue+0x81/0x350 [ 24.530581] remove_wait_queue+0x81/0x350 [ 24.530589] ? add_wait_queue+0x290/0x290 [ 24.530595] ? rcutorture_record_progress+0x10/0x10 [ 24.530605] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 24.530612] ? __kernel_text_address+0xd/0x40 [ 24.530620] ? clear_tfile_check_list+0x370/0x370 [ 24.530628] ? check_noncircular+0x20/0x20 [ 24.530636] ? locks_remove_file+0x3fa/0x5a0 [ 24.530645] ep_free+0x13f/0x320 [ 24.530651] ? ep_remove+0x800/0x800 [ 24.530657] ? fsnotify_first_mark+0x2b0/0x2b0 [ 24.530665] ? ep_free+0x320/0x320 [ 24.530671] ep_eventpoll_release+0x44/0x60 [ 24.530678] __fput+0x327/0x7e0 [ 24.530686] ? fput+0x140/0x140 [ 24.530692] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.530701] ____fput+0x15/0x20 [ 24.530708] task_work_run+0x199/0x270 [ 24.530716] ? task_work_cancel+0x210/0x210 [ 24.530722] ? _raw_spin_unlock+0x22/0x30 [ 24.530728] ? switch_task_namespaces+0x87/0xc0 [ 24.530736] do_exit+0x9bb/0x1ad0 [ 24.530744] ? binder_ioctl+0x551/0x1417 [ 24.530750] ? mm_update_next_owner+0x930/0x930 [ 24.530758] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.530767] ? avc_ss_reset+0x110/0x110 [ 24.530772] ? mutex_unlock+0xd/0x10 [ 24.530778] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 24.530797] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.530802] ? up_read+0x1a/0x40 [ 24.530809] ? rcu_note_context_switch+0x710/0x710 [ 24.530814] ? __fd_install+0x288/0x740 [ 24.530823] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.530828] ? do_vfs_ioctl+0x486/0x1520 [ 24.530833] ? _cond_resched+0x14/0x30 [ 24.530840] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.530848] ? selinux_capable+0x40/0x40 [ 24.530854] ? __alloc_fd+0x750/0x750 [ 24.530863] do_group_exit+0x149/0x400 [ 24.530869] ? SyS_exit+0x30/0x30 [ 24.530876] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.530883] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.530896] SyS_exit_group+0x1d/0x20 [ 24.530903] entry_SYSCALL_64_fastpath+0x23/0x9a [ 24.530907] RIP: 0033:0x4429f8 [ 24.530910] RSP: 002b:00007ffe0a2aa418 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.530917] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 24.530920] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.530924] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.530927] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 24.530930] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 24.530938] [ 24.530941] Allocated by task 3499: [ 24.530946] save_stack+0x43/0xd0 [ 24.530951] kasan_kmalloc+0xad/0xe0 [ 24.530956] kmem_cache_alloc_trace+0x136/0x750 [ 24.530960] binder_get_thread+0x1cf/0x870 [ 24.530964] binder_poll+0x8c/0x390 [ 24.530970] ep_item_poll.isra.10+0xec/0x320 [ 24.530974] ep_insert+0x6a3/0x1b10 [ 24.530980] SyS_epoll_ctl+0x12e4/0x1ab0 [ 24.530985] entry_SYSCALL_64_fastpath+0x23/0x9a [ 24.530986] [ 24.530988] Freed by task 3499: [ 24.530993] save_stack+0x43/0xd0 [ 24.530997] kasan_slab_free+0x71/0xc0 [ 24.531005] kfree+0xd6/0x260 [ 24.531009] binder_thread_dec_tmpref+0x27f/0x310 [ 24.531014] binder_thread_release+0x27d/0x540 [ 24.531018] binder_ioctl+0xc02/0x1417 [ 24.531023] do_vfs_ioctl+0x1b1/0x1520 [ 24.531027] SyS_ioctl+0x8f/0xc0 [ 24.531032] entry_SYSCALL_64_fastpath+0x23/0x9a [ 24.531033] [ 24.531037] The buggy address belongs to the object at ffff8801c7060340 [ 24.531037] which belongs to the cache kmalloc-512 of size 512 [ 24.531042] The buggy address is located 176 bytes inside of [ 24.531042] 512-byte region [ffff8801c7060340, ffff8801c7060540) [ 24.531044] The buggy address belongs to the page: [ 24.531049] page:0000000036847aad count:1 mapcount:0 mapping:000000002e773597 index:0x0 [ 24.531054] flags: 0x2fffc0000000100(slab) [ 24.531063] raw: 02fffc0000000100 ffff8801c70600c0 0000000000000000 0000000100000006 [ 24.531069] raw: ffffea00071d83a0 ffffea00073967e0 ffff8801dac00940 0000000000000000 [ 24.531072] page dumped because: kasan: bad access detected [ 24.531073] [ 24.531075] Memory state around the buggy address: [ 24.531079] ffff8801c7060280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 24.531083] ffff8801c7060300: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 24.531088] >ffff8801c7060380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.531090] ^ [ 24.531094] ffff8801c7060400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.531099] ffff8801c7060480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.531100] ================================================================== [ 24.531102] Disabling lock debugging due to kernel taint [ 24.531105] Kernel panic - not syncing: panic_on_warn set ... [ 24.531105] [ 24.531111] CPU: 1 PID: 3499 Comm: syzkaller432666 Tainted: G B 4.15.0-rc6+ #245 [ 24.531114] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.531116] Call Trace: [ 24.531122] dump_stack+0x194/0x257 [ 24.531129] ? arch_local_irq_restore+0x53/0x53 [ 24.531134] ? kasan_end_report+0x32/0x50 [ 24.531140] ? lock_downgrade+0x980/0x980 [ 24.531146] ? vsnprintf+0x1ed/0x1900 [ 24.531152] ? __lock_acquire+0x3c70/0x3e00 [ 24.531158] panic+0x1e4/0x41c [ 24.531164] ? refcount_error_report+0x214/0x214 [ 24.531171] ? add_taint+0x40/0x50 [ 24.531176] ? add_taint+0x1c/0x50 [ 24.531182] ? __lock_acquire+0x3d4d/0x3e00 [ 24.531188] kasan_end_report+0x50/0x50 [ 24.531194] kasan_report+0x144/0x340 [ 24.531202] __asan_report_load8_noabort+0x14/0x20 [ 24.531207] __lock_acquire+0x3d4d/0x3e00 [ 24.531213] ? __lock_acquire+0x664/0x3e00 [ 24.531218] ? lock_downgrade+0x980/0x980 [ 24.531223] ? lock_downgrade+0x980/0x980 [ 24.531231] ? remove_wait_queue+0x81/0x350 [ 24.531239] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.531246] ? __lock_acquire+0x664/0x3e00 [ 24.531251] ? check_noncircular+0x20/0x20 [ 24.531262] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.531269] ? lock_acquire+0x1d5/0x580 [ 24.531275] ? lock_acquire+0x1d5/0x580 [ 24.531280] ? ep_free+0xf4/0x320 [ 24.531288] ? lock_release+0xa40/0xa40 [ 24.531294] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.531300] ? print_irqtrace_events+0x270/0x270 [ 24.531306] ? rcu_note_context_switch+0x710/0x710 [ 24.531313] ? __might_sleep+0x95/0x190 [ 24.531319] ? ep_free+0xf4/0x320 [ 24.531324] ? __mutex_lock+0x16f/0x1a80 [ 24.531329] ? ep_free+0xf4/0x320 [ 24.531336] ? print_irqtrace_events+0x270/0x270 [ 24.531341] ? ep_free+0xf4/0x320 [ 24.531349] lock_acquire+0x1d5/0x580 [ 24.531354] ? lock_acquire+0x1d5/0x580 [ 24.531359] ? remove_wait_queue+0x81/0x350 [ 24.531365] ? __lock_acquire+0x664/0x3e00 [ 24.531373] ? lock_release+0xa40/0xa40 [ 24.531382] ? lock_acquire+0x1d5/0x580 [ 24.531387] ? lock_acquire+0x1d5/0x580 [ 24.531393] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 24.531400] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.531406] ? remove_wait_queue+0x81/0x350 [ 24.531412] remove_wait_queue+0x81/0x350 [ 24.531420] ? add_wait_queue+0x290/0x290 [ 24.531425] ? rcutorture_record_progress+0x10/0x10 [ 24.531435] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 24.531441] ? __kernel_text_address+0xd/0x40 [ 24.531449] ? clear_tfile_check_list+0x370/0x370 [ 24.531457] ? check_noncircular+0x20/0x20 [ 24.531464] ? locks_remove_file+0x3fa/0x5a0 [ 24.531473] ep_free+0x13f/0x320 [ 24.531479] ? ep_remove+0x800/0x800 [ 24.531485] ? fsnotify_first_mark+0x2b0/0x2b0 [ 24.531492] ? ep_free+0x320/0x320 [ 24.531498] ep_eventpoll_release+0x44/0x60 [ 24.531504] __fput+0x327/0x7e0 [ 24.531512] ? fput+0x140/0x140 [ 24.531518] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.531527] ____fput+0x15/0x20 [ 24.531533] task_work_run+0x199/0x270 [ 24.531541] ? task_work_cancel+0x210/0x210 [ 24.531547] ? _raw_spin_unlock+0x22/0x30 [ 24.531552] ? switch_task_namespaces+0x87/0xc0 [ 24.531560] do_exit+0x9bb/0x1ad0 [ 24.531567] ? binder_ioctl+0x551/0x1417 [ 24.531573] ? mm_update_next_owner+0x930/0x930 [ 24.531580] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.531588] ? avc_ss_reset+0x110/0x110 [ 24.531593] ? mutex_unlock+0xd/0x10 [ 24.531599] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 24.531616] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.531621] ? up_read+0x1a/0x40 [ 24.531628] ? rcu_note_context_switch+0x710/0x710 [ 24.531632] ? __fd_install+0x288/0x740 [ 24.531641] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.531646] ? do_vfs_ioctl+0x486/0x1520 [ 24.531650] ? _cond_resched+0x14/0x30 [ 24.531658] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.531665] ? selinux_capable+0x40/0x40 [ 24.531671] ? __alloc_fd+0x750/0x750 [ 24.531679] do_group_exit+0x149/0x400 [ 24.531685] ? SyS_exit+0x30/0x30 [ 24.531692] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.531698] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.531705] SyS_exit_group+0x1d/0x20 [ 24.531712] entry_SYSCALL_64_fastpath+0x23/0x9a [ 24.531715] RIP: 0033:0x4429f8 [ 24.531718] RSP: 002b:00007ffe0a2aa418 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.531724] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 24.531727] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.531730] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.531734] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 24.531737] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 24.550326] Dumping ftrace buffer: [ 24.550329] (ftrace buffer empty) [ 24.550332] Kernel Offset: disabled [ 25.688096] Rebooting in 86400 seconds..