[....] Starting enhanced syslogd: rsyslogd[ 13.237466] audit: type=1400 audit(1517027063.021:5): avc: denied { syslog } for pid=3506 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.632581] audit: type=1400 audit(1517027068.416:6): avc: denied { map } for pid=3647 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.220' (ECDSA) to the list of known hosts. executing program [ 25.014949] audit: type=1400 audit(1517027074.798:7): avc: denied { map } for pid=3661 comm="syzkaller165389" path="/root/syzkaller165389297" 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 [ 25.020359] ================================================================== [ 25.020377] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 25.020383] Read of size 8 at addr ffff8801d9888830 by task syzkaller165389/3661 [ 25.020385] [ 25.020393] CPU: 1 PID: 3661 Comm: syzkaller165389 Not tainted 4.15.0-rc9+ #282 [ 25.020396] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.020399] Call Trace: [ 25.020411] dump_stack+0x194/0x257 [ 25.020419] ? arch_local_irq_restore+0x53/0x53 [ 25.020428] ? show_regs_print_info+0x18/0x18 [ 25.020435] ? print_irqtrace_events+0x270/0x270 [ 25.020441] ? __lock_acquire+0x664/0x3e00 [ 25.020448] ? __lock_acquire+0x3d4d/0x3e00 [ 25.020458] print_address_description+0x73/0x250 [ 25.020464] ? __lock_acquire+0x3d4d/0x3e00 [ 25.020471] kasan_report+0x25b/0x340 [ 25.020479] __asan_report_load8_noabort+0x14/0x20 [ 25.020485] __lock_acquire+0x3d4d/0x3e00 [ 25.020491] ? __lock_acquire+0x664/0x3e00 [ 25.020497] ? lock_downgrade+0x980/0x980 [ 25.020502] ? lock_downgrade+0x980/0x980 [ 25.020511] ? remove_wait_queue+0x81/0x350 [ 25.020520] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.020527] ? __lock_acquire+0x664/0x3e00 [ 25.020533] ? check_noncircular+0x20/0x20 [ 25.020546] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.020553] ? lock_acquire+0x1d5/0x580 [ 25.020558] ? lock_acquire+0x1d5/0x580 [ 25.020568] ? ep_free+0xf4/0x320 [ 25.020576] ? lock_release+0xa40/0xa40 [ 25.020584] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.020590] ? print_irqtrace_events+0x270/0x270 [ 25.020599] ? rcu_note_context_switch+0x710/0x710 [ 25.020606] ? __might_sleep+0x95/0x190 [ 25.020613] ? ep_free+0xf4/0x320 [ 25.020620] ? __mutex_lock+0x16f/0x1a80 [ 25.020625] ? ep_free+0xf4/0x320 [ 25.020632] ? print_irqtrace_events+0x270/0x270 [ 25.020637] ? ep_free+0xf4/0x320 [ 25.020645] lock_acquire+0x1d5/0x580 [ 25.020651] ? lock_acquire+0x1d5/0x580 [ 25.020657] ? remove_wait_queue+0x81/0x350 [ 25.020663] ? __lock_acquire+0x664/0x3e00 [ 25.020671] ? lock_release+0xa40/0xa40 [ 25.020694] ? lock_acquire+0x1d5/0x580 [ 25.020700] ? lock_acquire+0x1d5/0x580 [ 25.020706] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.020713] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.020719] ? remove_wait_queue+0x81/0x350 [ 25.020725] remove_wait_queue+0x81/0x350 [ 25.020733] ? add_wait_queue+0x290/0x290 [ 25.020740] ? rcutorture_record_progress+0x10/0x10 [ 25.020750] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.020759] ? __kernel_text_address+0xd/0x40 [ 25.020767] ? clear_tfile_check_list+0x370/0x370 [ 25.020775] ? check_noncircular+0x20/0x20 [ 25.020786] ? locks_remove_file+0x3fa/0x5a0 [ 25.020796] ep_free+0x13f/0x320 [ 25.020802] ? ep_remove+0x800/0x800 [ 25.020808] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.020816] ? ep_free+0x320/0x320 [ 25.020822] ep_eventpoll_release+0x44/0x60 [ 25.020832] __fput+0x327/0x7e0 [ 25.020841] ? fput+0x140/0x140 [ 25.020848] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.020857] ____fput+0x15/0x20 [ 25.020863] task_work_run+0x199/0x270 [ 25.020871] ? task_work_cancel+0x210/0x210 [ 25.020878] ? _raw_spin_unlock+0x22/0x30 [ 25.020885] ? switch_task_namespaces+0x87/0xc0 [ 25.020896] do_exit+0x9bb/0x1ad0 [ 25.020904] ? binder_ioctl+0x521/0x1417 [ 25.020911] ? mm_update_next_owner+0x930/0x930 [ 25.020918] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.020930] ? avc_ss_reset+0x110/0x110 [ 25.020936] ? mutex_unlock+0xd/0x10 [ 25.020942] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 25.020947] ? find_held_lock+0x35/0x1d0 [ 25.020958] ? lock_downgrade+0x980/0x980 [ 25.020971] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.020979] ? rcu_note_context_switch+0x710/0x710 [ 25.020985] ? __fd_install+0x288/0x740 [ 25.020993] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.020999] ? do_vfs_ioctl+0x486/0x1520 [ 25.021008] ? _cond_resched+0x14/0x30 [ 25.021016] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.021024] ? selinux_capable+0x40/0x40 [ 25.021031] ? __alloc_fd+0x750/0x750 [ 25.021039] do_group_exit+0x149/0x400 [ 25.021046] ? SyS_exit+0x30/0x30 [ 25.021053] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.021061] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.021069] SyS_exit_group+0x1d/0x20 [ 25.021076] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.021081] RIP: 0033:0x4429f8 [ 25.021085] RSP: 002b:00007ffd0436a408 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.021092] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004429f8 [ 25.021095] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.021099] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.021102] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 25.021106] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.021114] [ 25.021117] Allocated by task 3661: [ 25.021123] save_stack+0x43/0xd0 [ 25.021128] kasan_kmalloc+0xad/0xe0 [ 25.021132] kmem_cache_alloc_trace+0x136/0x750 [ 25.021139] binder_get_thread+0x1cf/0x870 [ 25.021144] binder_poll+0x8c/0x390 [ 25.021149] ep_item_poll.isra.10+0xec/0x320 [ 25.021154] ep_insert+0x6a3/0x1b10 [ 25.021159] SyS_epoll_ctl+0x12e4/0x1ab0 [ 25.021164] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.021165] [ 25.021167] Freed by task 3661: [ 25.021172] save_stack+0x43/0xd0 [ 25.021177] kasan_slab_free+0x71/0xc0 [ 25.021181] kfree+0xd6/0x260 [ 25.021187] binder_thread_dec_tmpref+0x27f/0x310 [ 25.021192] binder_thread_release+0x27d/0x540 [ 25.021196] binder_ioctl+0xc02/0x1417 [ 25.021201] do_vfs_ioctl+0x1b1/0x1520 [ 25.021205] SyS_ioctl+0x8f/0xc0 [ 25.021209] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.021211] [ 25.021215] The buggy address belongs to the object at ffff8801d9888780 [ 25.021215] which belongs to the cache kmalloc-512 of size 512 [ 25.021220] The buggy address is located 176 bytes inside of [ 25.021220] 512-byte region [ffff8801d9888780, ffff8801d9888980) [ 25.021221] The buggy address belongs to the page: [ 25.021227] page:ffffea0007662200 count:1 mapcount:0 mapping:ffff8801d9888000 index:0x0 [ 25.021232] flags: 0x2fffc0000000100(slab) [ 25.021242] raw: 02fffc0000000100 ffff8801d9888000 0000000000000000 0000000100000006 [ 25.021249] raw: ffffea0007667e20 ffff8801dac01748 ffff8801dac00940 0000000000000000 [ 25.021251] page dumped because: kasan: bad access detected [ 25.021252] [ 25.021254] Memory state around the buggy address: [ 25.021259] ffff8801d9888700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.021263] ffff8801d9888780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.021268] >ffff8801d9888800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.021270] ^ [ 25.021274] ffff8801d9888880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.021278] ffff8801d9888900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.021280] ================================================================== [ 25.021282] Disabling lock debugging due to kernel taint [ 25.021285] Kernel panic - not syncing: panic_on_warn set ... [ 25.021285] [ 25.021291] CPU: 1 PID: 3661 Comm: syzkaller165389 Tainted: G B 4.15.0-rc9+ #282 [ 25.021295] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.021296] Call Trace: [ 25.021303] dump_stack+0x194/0x257 [ 25.021311] ? arch_local_irq_restore+0x53/0x53 [ 25.021316] ? kasan_end_report+0x32/0x50 [ 25.021322] ? lock_downgrade+0x980/0x980 [ 25.021329] ? vsnprintf+0x1ed/0x1900 [ 25.021336] ? __lock_acquire+0x3ca0/0x3e00 [ 25.021342] panic+0x1e4/0x41c [ 25.021348] ? refcount_error_report+0x214/0x214 [ 25.021355] ? add_taint+0x40/0x50 [ 25.021360] ? add_taint+0x1c/0x50 [ 25.021367] ? __lock_acquire+0x3d4d/0x3e00 [ 25.021373] kasan_end_report+0x50/0x50 [ 25.021379] kasan_report+0x144/0x340 [ 25.021387] __asan_report_load8_noabort+0x14/0x20 [ 25.021393] __lock_acquire+0x3d4d/0x3e00 [ 25.021399] ? __lock_acquire+0x664/0x3e00 [ 25.021404] ? lock_downgrade+0x980/0x980 [ 25.021410] ? lock_downgrade+0x980/0x980 [ 25.021417] ? remove_wait_queue+0x81/0x350 [ 25.021427] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.021433] ? __lock_acquire+0x664/0x3e00 [ 25.021438] ? check_noncircular+0x20/0x20 [ 25.021451] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.021458] ? lock_acquire+0x1d5/0x580 [ 25.021464] ? lock_acquire+0x1d5/0x580 [ 25.021469] ? ep_free+0xf4/0x320 [ 25.021477] ? lock_release+0xa40/0xa40 [ 25.021483] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.021489] ? print_irqtrace_events+0x270/0x270 [ 25.021496] ? rcu_note_context_switch+0x710/0x710 [ 25.021503] ? __might_sleep+0x95/0x190 [ 25.021509] ? ep_free+0xf4/0x320 [ 25.021515] ? __mutex_lock+0x16f/0x1a80 [ 25.021520] ? ep_free+0xf4/0x320 [ 25.021527] ? print_irqtrace_events+0x270/0x270 [ 25.021533] ? ep_free+0xf4/0x320 [ 25.021541] lock_acquire+0x1d5/0x580 [ 25.021546] ? lock_acquire+0x1d5/0x580 [ 25.021552] ? remove_wait_queue+0x81/0x350 [ 25.021558] ? __lock_acquire+0x664/0x3e00 [ 25.021565] ? lock_release+0xa40/0xa40 [ 25.021575] ? lock_acquire+0x1d5/0x580 [ 25.021580] ? lock_acquire+0x1d5/0x580 [ 25.021586] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.021593] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.021599] ? remove_wait_queue+0x81/0x350 [ 25.021605] remove_wait_queue+0x81/0x350 [ 25.021613] ? add_wait_queue+0x290/0x290 [ 25.021619] ? rcutorture_record_progress+0x10/0x10 [ 25.021629] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.021635] ? __kernel_text_address+0xd/0x40 [ 25.021643] ? clear_tfile_check_list+0x370/0x370 [ 25.021651] ? check_noncircular+0x20/0x20 [ 25.021659] ? locks_remove_file+0x3fa/0x5a0 [ 25.021668] ep_free+0x13f/0x320 [ 25.021675] ? ep_remove+0x800/0x800 [ 25.021680] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.021693] ? ep_free+0x320/0x320 [ 25.021699] ep_eventpoll_release+0x44/0x60 [ 25.021705] __fput+0x327/0x7e0 [ 25.021714] ? fput+0x140/0x140 [ 25.021721] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.021729] ____fput+0x15/0x20 [ 25.021736] task_work_run+0x199/0x270 [ 25.021744] ? task_work_cancel+0x210/0x210 [ 25.021750] ? _raw_spin_unlock+0x22/0x30 [ 25.021756] ? switch_task_namespaces+0x87/0xc0 [ 25.021764] do_exit+0x9bb/0x1ad0 [ 25.021771] ? binder_ioctl+0x521/0x1417 [ 25.021777] ? mm_update_next_owner+0x930/0x930 [ 25.021784] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.021792] ? avc_ss_reset+0x110/0x110 [ 25.021798] ? mutex_unlock+0xd/0x10 [ 25.021804] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 25.021809] ? find_held_lock+0x35/0x1d0 [ 25.021819] ? lock_downgrade+0x980/0x980 [ 25.021832] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.021840] ? rcu_note_context_switch+0x710/0x710 [ 25.021844] ? __fd_install+0x288/0x740 [ 25.021853] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.021858] ? do_vfs_ioctl+0x486/0x1520 [ 25.021863] ? _cond_resched+0x14/0x30 [ 25.021871] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.021879] ? selinux_capable+0x40/0x40 [ 25.021885] ? __alloc_fd+0x750/0x750 [ 25.021893] do_group_exit+0x149/0x400 [ 25.021900] ? SyS_exit+0x30/0x30 [ 25.021907] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.021914] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.021921] SyS_exit_group+0x1d/0x20 [ 25.021927] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.021931] RIP: 0033:0x4429f8 [ 25.021934] RSP: 002b:00007ffd0436a408 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.021940] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004429f8 [ 25.021943] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.021946] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.021950] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 25.021953] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.041306] Dumping ftrace buffer: [ 25.041310] (ftrace buffer empty) [ 25.041312] Kernel Offset: disabled [ 26.175706] Rebooting in 86400 seconds..