[....] Starting enhanced syslogd: rsyslogd[ 12.332820] audit: type=1400 audit(1514841317.792:5): avc: denied { syslog } for pid=3334 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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 18.463127] audit: type=1400 audit(1514841323.922:6): avc: denied { map } for pid=3472 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.22' (ECDSA) to the list of known hosts. executing program [ 29.783542] audit: type=1400 audit(1514841335.243:7): avc: denied { map } for pid=3487 comm="syzkaller907084" path="/root/syzkaller907084548" 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 [ 29.787131] ================================================================== [ 29.787142] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 29.787146] Read of size 8 at addr ffff8801c84d8130 by task syzkaller907084/3487 [ 29.787147] [ 29.787152] CPU: 1 PID: 3487 Comm: syzkaller907084 Not tainted 4.15.0-rc6+ #155 [ 29.787154] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.787156] Call Trace: [ 29.787163] dump_stack+0x194/0x257 [ 29.787168] ? arch_local_irq_restore+0x53/0x53 [ 29.787173] ? show_regs_print_info+0x18/0x18 [ 29.787177] ? print_irqtrace_events+0x270/0x270 [ 29.787181] ? __lock_acquire+0x664/0x3e00 [ 29.787185] ? __lock_acquire+0x3d4d/0x3e00 [ 29.787192] print_address_description+0x73/0x250 [ 29.787195] ? __lock_acquire+0x3d4d/0x3e00 [ 29.787199] kasan_report+0x25b/0x340 [ 29.787209] __asan_report_load8_noabort+0x14/0x20 [ 29.787213] __lock_acquire+0x3d4d/0x3e00 [ 29.787216] ? __lock_acquire+0x664/0x3e00 [ 29.787220] ? lock_downgrade+0x980/0x980 [ 29.787223] ? lock_downgrade+0x980/0x980 [ 29.787227] ? print_irqtrace_events+0x270/0x270 [ 29.787232] ? remove_wait_queue+0x81/0x350 [ 29.787237] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.787241] ? __lock_acquire+0x664/0x3e00 [ 29.787245] ? check_noncircular+0x20/0x20 [ 29.787251] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.787256] ? lock_acquire+0x1d5/0x580 [ 29.787259] ? lock_acquire+0x1d5/0x580 [ 29.787264] ? ep_free+0xf4/0x320 [ 29.787269] ? lock_release+0xa40/0xa40 [ 29.787274] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 29.787277] ? print_irqtrace_events+0x270/0x270 [ 29.787280] ? print_irqtrace_events+0x270/0x270 [ 29.787286] ? rcu_note_context_switch+0x710/0x710 [ 29.787290] ? __might_sleep+0x95/0x190 [ 29.787294] ? ep_free+0xf4/0x320 [ 29.787298] ? __mutex_lock+0x16f/0x1a80 [ 29.787301] ? ep_free+0xf4/0x320 [ 29.787305] ? print_irqtrace_events+0x270/0x270 [ 29.787308] ? ep_free+0xf4/0x320 [ 29.787313] lock_acquire+0x1d5/0x580 [ 29.787316] ? lock_acquire+0x1d5/0x580 [ 29.787320] ? remove_wait_queue+0x81/0x350 [ 29.787325] ? lock_release+0xa40/0xa40 [ 29.787330] ? lock_acquire+0x1d5/0x580 [ 29.787333] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.787336] ? lock_acquire+0x1d5/0x580 [ 29.787340] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 29.787345] _raw_spin_lock_irqsave+0x96/0xc0 [ 29.787349] ? remove_wait_queue+0x81/0x350 [ 29.787352] remove_wait_queue+0x81/0x350 [ 29.787357] ? depot_save_stack+0x3b5/0x490 [ 29.787362] ? add_wait_queue+0x290/0x290 [ 29.787365] ? rcutorture_record_progress+0x10/0x10 [ 29.787369] ? lock_release+0xa40/0xa40 [ 29.787374] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 29.787380] ? __kernel_text_address+0xd/0x40 [ 29.787384] ? clear_tfile_check_list+0x370/0x370 [ 29.787389] ? check_noncircular+0x20/0x20 [ 29.787394] ? locks_remove_file+0x3fa/0x5a0 [ 29.787400] ep_free+0x13f/0x320 [ 29.787404] ? ep_remove+0x800/0x800 [ 29.787408] ? fsnotify_first_mark+0x2b0/0x2b0 [ 29.787412] ? ep_free+0x320/0x320 [ 29.787416] ep_eventpoll_release+0x44/0x60 [ 29.787422] __fput+0x327/0x7e0 [ 29.787427] ? fput+0x140/0x140 [ 29.787431] ? _raw_spin_unlock_irq+0x27/0x70 [ 29.787436] ____fput+0x15/0x20 [ 29.787440] task_work_run+0x199/0x270 [ 29.787444] ? task_work_cancel+0x210/0x210 [ 29.787448] ? _raw_spin_unlock+0x22/0x30 [ 29.787451] ? switch_task_namespaces+0x87/0xc0 [ 29.787458] do_exit+0x9bb/0x1ad0 [ 29.787462] ? __handle_mm_fault+0x2330/0x3ce0 [ 29.787467] ? mm_update_next_owner+0x930/0x930 [ 29.787473] ? do_raw_spin_trylock+0x190/0x190 [ 29.787477] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 29.787481] ? check_noncircular+0x20/0x20 [ 29.787485] ? _raw_spin_unlock+0x22/0x30 [ 29.787488] ? __handle_mm_fault+0x80e/0x3ce0 [ 29.787493] ? check_noncircular+0x20/0x20 [ 29.787496] ? __pmd_alloc+0x4e0/0x4e0 [ 29.787499] ? lock_downgrade+0x980/0x980 [ 29.787504] ? find_held_lock+0x35/0x1d0 [ 29.787509] ? handle_mm_fault+0x248/0x8d0 [ 29.787512] ? find_held_lock+0x35/0x1d0 [ 29.787519] ? __do_page_fault+0x5f7/0xc90 [ 29.787523] ? lock_downgrade+0x980/0x980 [ 29.787528] ? handle_mm_fault+0x410/0x8d0 [ 29.787531] ? down_read_trylock+0xdb/0x170 [ 29.787534] ? __do_page_fault+0x32d/0xc90 [ 29.787538] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 29.787542] ? vmacache_find+0x5f/0x280 [ 29.787547] do_group_exit+0x149/0x400 [ 29.787551] ? __do_page_fault+0x3d6/0xc90 [ 29.787554] ? SyS_exit+0x30/0x30 [ 29.787560] ? do_fast_syscall_32+0x156/0xf9d [ 29.787563] ? do_group_exit+0x400/0x400 [ 29.787567] SyS_exit_group+0x1d/0x20 [ 29.787571] do_fast_syscall_32+0x3ee/0xf9d [ 29.787576] ? do_int80_syscall_32+0x9d0/0x9d0 [ 29.787579] ? kasan_check_read+0x11/0x20 [ 29.787583] ? syscall_return_slowpath+0x550/0x550 [ 29.787588] ? SyS_rt_sigaction+0x94/0x1b0 [ 29.787592] ? SyS_sigprocmask+0x4b0/0x4b0 [ 29.787595] ? SyS_read+0x184/0x220 [ 29.787599] ? retint_user+0x18/0x18 [ 29.787604] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 29.787610] entry_SYSENTER_compat+0x54/0x63 [ 29.787613] RIP: 0023:0xf7f3bc79 [ 29.787615] RSP: 002b:00000000ffcdb53c EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 29.787619] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f0298 [ 29.787621] RDX: 0000000000000000 RSI: 00000000080d9ad8 RDI: 00000000080f02a0 [ 29.787623] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 29.787625] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 29.787627] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 29.787632] [ 29.787634] Allocated by task 3487: [ 29.787637] save_stack+0x43/0xd0 [ 29.787640] kasan_kmalloc+0xad/0xe0 [ 29.787643] kmem_cache_alloc_trace+0x136/0x750 [ 29.787647] binder_get_thread+0x1cf/0x870 [ 29.787650] binder_poll+0x8c/0x390 [ 29.787653] ep_item_poll.isra.10+0xec/0x320 [ 29.787656] ep_insert+0x6a3/0x1b10 [ 29.787659] SyS_epoll_ctl+0x12e4/0x1ab0 [ 29.787662] do_fast_syscall_32+0x3ee/0xf9d [ 29.787665] entry_SYSENTER_compat+0x54/0x63 [ 29.787666] [ 29.787667] Freed by task 3487: [ 29.787670] save_stack+0x43/0xd0 [ 29.787673] kasan_slab_free+0x71/0xc0 [ 29.787675] kfree+0xd6/0x260 [ 29.787678] binder_thread_dec_tmpref+0x27f/0x310 [ 29.787681] binder_thread_release+0x27d/0x540 [ 29.787683] binder_ioctl+0xc02/0x1417 [ 29.787687] compat_SyS_ioctl+0x151/0x2a30 [ 29.787690] do_fast_syscall_32+0x3ee/0xf9d [ 29.787693] entry_SYSENTER_compat+0x54/0x63 [ 29.787694] [ 29.787696] The buggy address belongs to the object at ffff8801c84d8080 [ 29.787696] which belongs to the cache kmalloc-512 of size 512 [ 29.787699] The buggy address is located 176 bytes inside of [ 29.787699] 512-byte region [ffff8801c84d8080, ffff8801c84d8280) [ 29.787700] The buggy address belongs to the page: [ 29.787704] page:0000000073d6ccc7 count:1 mapcount:0 mapping:000000004a7654d0 index:0x0 [ 29.787708] flags: 0x2fffc0000000100(slab) [ 29.787714] raw: 02fffc0000000100 ffff8801c84d8080 0000000000000000 0000000100000006 [ 29.787718] raw: ffffea00072136a0 ffffea000731c3a0 ffff8801dac00940 0000000000000000 [ 29.787720] page dumped because: kasan: bad access detected [ 29.787721] [ 29.787722] Memory state around the buggy address: [ 29.787724] ffff8801c84d8000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.787727] ffff8801c84d8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.787729] >ffff8801c84d8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.787731] ^ [ 29.787733] ffff8801c84d8180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.787736] ffff8801c84d8200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.787737] ================================================================== [ 29.787738] Disabling lock debugging due to kernel taint [ 29.787740] Kernel panic - not syncing: panic_on_warn set ... [ 29.787740] [ 29.787744] CPU: 1 PID: 3487 Comm: syzkaller907084 Tainted: G B 4.15.0-rc6+ #155 [ 29.787746] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.787747] Call Trace: [ 29.787751] dump_stack+0x194/0x257 [ 29.787755] ? arch_local_irq_restore+0x53/0x53 [ 29.787758] ? kasan_end_report+0x32/0x50 [ 29.787762] ? lock_downgrade+0x980/0x980 [ 29.787766] ? vsnprintf+0x1ed/0x1900 [ 29.787770] ? __lock_acquire+0x3c70/0x3e00 [ 29.787773] panic+0x1e4/0x41c [ 29.787777] ? refcount_error_report+0x214/0x214 [ 29.787781] ? add_taint+0x40/0x50 [ 29.787784] ? add_taint+0x1c/0x50 [ 29.787788] ? __lock_acquire+0x3d4d/0x3e00 [ 29.787791] kasan_end_report+0x50/0x50 [ 29.787795] kasan_report+0x144/0x340 [ 29.787799] __asan_report_load8_noabort+0x14/0x20 [ 29.787803] __lock_acquire+0x3d4d/0x3e00 [ 29.787806] ? __lock_acquire+0x664/0x3e00 [ 29.787810] ? lock_downgrade+0x980/0x980 [ 29.787813] ? lock_downgrade+0x980/0x980 [ 29.787816] ? print_irqtrace_events+0x270/0x270 [ 29.787820] ? remove_wait_queue+0x81/0x350 [ 29.787825] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.787829] ? __lock_acquire+0x664/0x3e00 [ 29.787832] ? check_noncircular+0x20/0x20 [ 29.787839] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.787843] ? lock_acquire+0x1d5/0x580 [ 29.787846] ? lock_acquire+0x1d5/0x580 [ 29.787849] ? ep_free+0xf4/0x320 [ 29.787854] ? lock_release+0xa40/0xa40 [ 29.787857] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 29.787861] ? print_irqtrace_events+0x270/0x270 [ 29.787864] ? print_irqtrace_events+0x270/0x270 [ 29.787868] ? rcu_note_context_switch+0x710/0x710 [ 29.787872] ? __might_sleep+0x95/0x190 [ 29.787875] ? ep_free+0xf4/0x320 [ 29.787879] ? __mutex_lock+0x16f/0x1a80 [ 29.787881] ? ep_free+0xf4/0x320 [ 29.787885] ? print_irqtrace_events+0x270/0x270 [ 29.787888] ? ep_free+0xf4/0x320 [ 29.787893] lock_acquire+0x1d5/0x580 [ 29.787896] ? lock_acquire+0x1d5/0x580 [ 29.787900] ? remove_wait_queue+0x81/0x350 [ 29.787904] ? lock_release+0xa40/0xa40 [ 29.787909] ? lock_acquire+0x1d5/0x580 [ 29.787913] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.787916] ? lock_acquire+0x1d5/0x580 [ 29.787919] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 29.787924] _raw_spin_lock_irqsave+0x96/0xc0 [ 29.787927] ? remove_wait_queue+0x81/0x350 [ 29.787931] remove_wait_queue+0x81/0x350 [ 29.787934] ? depot_save_stack+0x3b5/0x490 [ 29.787938] ? add_wait_queue+0x290/0x290 [ 29.787942] ? rcutorture_record_progress+0x10/0x10 [ 29.787945] ? lock_release+0xa40/0xa40 [ 29.787950] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 29.787954] ? __kernel_text_address+0xd/0x40 [ 29.787959] ? clear_tfile_check_list+0x370/0x370 [ 29.787963] ? check_noncircular+0x20/0x20 [ 29.787968] ? locks_remove_file+0x3fa/0x5a0 [ 29.787973] ep_free+0x13f/0x320 [ 29.787976] ? ep_remove+0x800/0x800 [ 29.787980] ? fsnotify_first_mark+0x2b0/0x2b0 [ 29.787984] ? ep_free+0x320/0x320 [ 29.787988] ep_eventpoll_release+0x44/0x60 [ 29.787991] __fput+0x327/0x7e0 [ 29.787996] ? fput+0x140/0x140 [ 29.788000] ? _raw_spin_unlock_irq+0x27/0x70 [ 29.788008] ____fput+0x15/0x20 [ 29.788012] task_work_run+0x199/0x270 [ 29.788016] ? task_work_cancel+0x210/0x210 [ 29.788020] ? _raw_spin_unlock+0x22/0x30 [ 29.788023] ? switch_task_namespaces+0x87/0xc0 [ 29.788028] do_exit+0x9bb/0x1ad0 [ 29.788031] ? __handle_mm_fault+0x2330/0x3ce0 [ 29.788036] ? mm_update_next_owner+0x930/0x930 [ 29.788041] ? do_raw_spin_trylock+0x190/0x190 [ 29.788045] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 29.788049] ? check_noncircular+0x20/0x20 [ 29.788053] ? _raw_spin_unlock+0x22/0x30 [ 29.788056] ? __handle_mm_fault+0x80e/0x3ce0 [ 29.788061] ? check_noncircular+0x20/0x20 [ 29.788063] ? __pmd_alloc+0x4e0/0x4e0 [ 29.788066] ? lock_downgrade+0x980/0x980 [ 29.788071] ? find_held_lock+0x35/0x1d0 [ 29.788076] ? handle_mm_fault+0x248/0x8d0 [ 29.788080] ? find_held_lock+0x35/0x1d0 [ 29.788085] ? __do_page_fault+0x5f7/0xc90 [ 29.788088] ? lock_downgrade+0x980/0x980 [ 29.788093] ? handle_mm_fault+0x410/0x8d0 [ 29.788096] ? down_read_trylock+0xdb/0x170 [ 29.788100] ? __do_page_fault+0x32d/0xc90 [ 29.788103] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 29.788107] ? vmacache_find+0x5f/0x280 [ 29.788111] do_group_exit+0x149/0x400 [ 29.788115] ? __do_page_fault+0x3d6/0xc90 [ 29.788118] ? SyS_exit+0x30/0x30 [ 29.788123] ? do_fast_syscall_32+0x156/0xf9d [ 29.788126] ? do_group_exit+0x400/0x400 [ 29.788130] SyS_exit_group+0x1d/0x20 [ 29.788134] do_fast_syscall_32+0x3ee/0xf9d [ 29.788139] ? do_int80_syscall_32+0x9d0/0x9d0 [ 29.788142] ? kasan_check_read+0x11/0x20 [ 29.788146] ? syscall_return_slowpath+0x550/0x550 [ 29.788150] ? SyS_rt_sigaction+0x94/0x1b0 [ 29.788154] ? SyS_sigprocmask+0x4b0/0x4b0 [ 29.788157] ? SyS_read+0x184/0x220 [ 29.788160] ? retint_user+0x18/0x18 [ 29.788165] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 29.788170] entry_SYSENTER_compat+0x54/0x63 [ 29.788173] RIP: 0023:0xf7f3bc79 [ 29.788175] RSP: 002b:00000000ffcdb53c EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 29.788178] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f0298 [ 29.788180] RDX: 0000000000000000 RSI: 00000000080d9ad8 RDI: 00000000080f02a0 [ 29.788182] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 29.788184] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 29.788185] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 29.809690] Dumping ftrace buffer: [ 29.809693] (ftrace buffer empty) [ 29.809695] Kernel Offset: disabled [ 31.104449] Rebooting in 86400 seconds..