[....] Starting enhanced syslogd: rsyslogd[ 12.477091] audit: type=1400 audit(1515006982.607:5): avc: denied { syslog } for pid=3340 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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: [ 17.123849] audit: type=1400 audit(1515006987.254:6): avc: denied { map } for pid=3479 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.49' (ECDSA) to the list of known hosts. executing program [ 23.356571] audit: type=1400 audit(1515006993.487:7): avc: denied { map } for pid=3493 comm="syzkaller148778" path="/root/syzkaller148778038" 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 [ 23.362213] ================================================================== [ 23.362226] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 23.362232] Read of size 8 at addr ffff8801c88ee130 by task syzkaller148778/3493 [ 23.362233] [ 23.362240] CPU: 1 PID: 3493 Comm: syzkaller148778 Not tainted 4.15.0-rc6+ #245 [ 23.362243] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.362245] Call Trace: [ 23.362258] dump_stack+0x194/0x257 [ 23.362266] ? arch_local_irq_restore+0x53/0x53 [ 23.362274] ? show_regs_print_info+0x18/0x18 [ 23.362279] ? print_irqtrace_events+0x270/0x270 [ 23.362286] ? __lock_acquire+0x664/0x3e00 [ 23.362292] ? __lock_acquire+0x3d4d/0x3e00 [ 23.362302] print_address_description+0x73/0x250 [ 23.362308] ? __lock_acquire+0x3d4d/0x3e00 [ 23.362314] kasan_report+0x25b/0x340 [ 23.362322] __asan_report_load8_noabort+0x14/0x20 [ 23.362327] __lock_acquire+0x3d4d/0x3e00 [ 23.362333] ? __lock_acquire+0x664/0x3e00 [ 23.362338] ? lock_downgrade+0x980/0x980 [ 23.362344] ? lock_downgrade+0x980/0x980 [ 23.362352] ? remove_wait_queue+0x81/0x350 [ 23.362361] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.362367] ? __lock_acquire+0x664/0x3e00 [ 23.362372] ? check_noncircular+0x20/0x20 [ 23.362385] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.362392] ? lock_acquire+0x1d5/0x580 [ 23.362397] ? lock_acquire+0x1d5/0x580 [ 23.362405] ? ep_free+0xf4/0x320 [ 23.362413] ? lock_release+0xa40/0xa40 [ 23.362420] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.362426] ? print_irqtrace_events+0x270/0x270 [ 23.362433] ? rcu_note_context_switch+0x710/0x710 [ 23.362441] ? __might_sleep+0x95/0x190 [ 23.362446] ? ep_free+0xf4/0x320 [ 23.362452] ? __mutex_lock+0x16f/0x1a80 [ 23.362457] ? ep_free+0xf4/0x320 [ 23.362464] ? print_irqtrace_events+0x270/0x270 [ 23.362468] ? ep_free+0xf4/0x320 [ 23.362477] lock_acquire+0x1d5/0x580 [ 23.362482] ? lock_acquire+0x1d5/0x580 [ 23.362487] ? remove_wait_queue+0x81/0x350 [ 23.362493] ? __lock_acquire+0x664/0x3e00 [ 23.362501] ? lock_release+0xa40/0xa40 [ 23.362510] ? lock_acquire+0x1d5/0x580 [ 23.362515] ? lock_acquire+0x1d5/0x580 [ 23.362521] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 23.362529] _raw_spin_lock_irqsave+0x96/0xc0 [ 23.362534] ? remove_wait_queue+0x81/0x350 [ 23.362540] remove_wait_queue+0x81/0x350 [ 23.362548] ? add_wait_queue+0x290/0x290 [ 23.362554] ? rcutorture_record_progress+0x10/0x10 [ 23.362564] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 23.362570] ? __kernel_text_address+0xd/0x40 [ 23.362578] ? clear_tfile_check_list+0x370/0x370 [ 23.362586] ? check_noncircular+0x20/0x20 [ 23.362594] ? locks_remove_file+0x3fa/0x5a0 [ 23.362603] ep_free+0x13f/0x320 [ 23.362610] ? ep_remove+0x800/0x800 [ 23.362615] ? fsnotify_first_mark+0x2b0/0x2b0 [ 23.362623] ? ep_free+0x320/0x320 [ 23.362629] ep_eventpoll_release+0x44/0x60 [ 23.362635] __fput+0x327/0x7e0 [ 23.362644] ? fput+0x140/0x140 [ 23.362651] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.362659] ____fput+0x15/0x20 [ 23.362665] task_work_run+0x199/0x270 [ 23.362673] ? task_work_cancel+0x210/0x210 [ 23.362679] ? _raw_spin_unlock+0x22/0x30 [ 23.362685] ? switch_task_namespaces+0x87/0xc0 [ 23.362693] do_exit+0x9bb/0x1ad0 [ 23.362703] ? binder_ioctl+0x551/0x1417 [ 23.362709] ? mm_update_next_owner+0x930/0x930 [ 23.362716] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 23.362726] ? avc_ss_reset+0x110/0x110 [ 23.362731] ? mutex_unlock+0xd/0x10 [ 23.362737] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 23.362756] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.362761] ? up_read+0x1a/0x40 [ 23.362767] ? rcu_note_context_switch+0x710/0x710 [ 23.362772] ? __fd_install+0x288/0x740 [ 23.362781] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 23.362787] ? do_vfs_ioctl+0x486/0x1520 [ 23.362791] ? _cond_resched+0x14/0x30 [ 23.362799] ? ioctl_preallocate+0x2b0/0x2b0 [ 23.362808] ? selinux_capable+0x40/0x40 [ 23.362814] ? __alloc_fd+0x750/0x750 [ 23.362822] do_group_exit+0x149/0x400 [ 23.362829] ? SyS_exit+0x30/0x30 [ 23.362836] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.362844] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.362851] SyS_exit_group+0x1d/0x20 [ 23.362858] entry_SYSCALL_64_fastpath+0x23/0x9a [ 23.362862] RIP: 0033:0x4429f8 [ 23.362866] RSP: 002b:00007fff40540a48 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 23.362872] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 23.362875] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 23.362879] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 23.362882] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 23.362885] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 23.362893] [ 23.362896] Allocated by task 3493: [ 23.362902] save_stack+0x43/0xd0 [ 23.362906] kasan_kmalloc+0xad/0xe0 [ 23.362911] kmem_cache_alloc_trace+0x136/0x750 [ 23.362916] binder_get_thread+0x1cf/0x870 [ 23.362920] binder_poll+0x8c/0x390 [ 23.362925] ep_item_poll.isra.10+0xec/0x320 [ 23.362929] ep_insert+0x6a3/0x1b10 [ 23.362934] SyS_epoll_ctl+0x12e4/0x1ab0 [ 23.362940] entry_SYSCALL_64_fastpath+0x23/0x9a [ 23.362941] [ 23.362943] Freed by task 3493: [ 23.362947] save_stack+0x43/0xd0 [ 23.362952] kasan_slab_free+0x71/0xc0 [ 23.362956] kfree+0xd6/0x260 [ 23.362960] binder_thread_dec_tmpref+0x27f/0x310 [ 23.362965] binder_thread_release+0x27d/0x540 [ 23.362969] binder_ioctl+0xc02/0x1417 [ 23.362974] do_vfs_ioctl+0x1b1/0x1520 [ 23.362978] SyS_ioctl+0x8f/0xc0 [ 23.362983] entry_SYSCALL_64_fastpath+0x23/0x9a [ 23.362984] [ 23.362988] The buggy address belongs to the object at ffff8801c88ee080 [ 23.362988] which belongs to the cache kmalloc-512 of size 512 [ 23.362993] The buggy address is located 176 bytes inside of [ 23.362993] 512-byte region [ffff8801c88ee080, ffff8801c88ee280) [ 23.362994] The buggy address belongs to the page: [ 23.363000] page:0000000081bc1428 count:1 mapcount:0 mapping:000000002d782533 index:0x0 [ 23.363008] flags: 0x2fffc0000000100(slab) [ 23.363017] raw: 02fffc0000000100 ffff8801c88ee080 0000000000000000 0000000100000006 [ 23.363023] raw: ffffea00072239e0 ffffea0007397260 ffff8801dac00940 0000000000000000 [ 23.363026] page dumped because: kasan: bad access detected [ 23.363027] [ 23.363028] Memory state around the buggy address: [ 23.363033] ffff8801c88ee000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.363037] ffff8801c88ee080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.363042] >ffff8801c88ee100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.363044] ^ [ 23.363048] ffff8801c88ee180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.363052] ffff8801c88ee200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.363054] ================================================================== [ 23.363055] Disabling lock debugging due to kernel taint [ 23.363059] Kernel panic - not syncing: panic_on_warn set ... [ 23.363059] [ 23.363065] CPU: 1 PID: 3493 Comm: syzkaller148778 Tainted: G B 4.15.0-rc6+ #245 [ 23.363068] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.363070] Call Trace: [ 23.363076] dump_stack+0x194/0x257 [ 23.363083] ? arch_local_irq_restore+0x53/0x53 [ 23.363088] ? kasan_end_report+0x32/0x50 [ 23.363094] ? lock_downgrade+0x980/0x980 [ 23.363101] ? vsnprintf+0x1ed/0x1900 [ 23.363107] ? __lock_acquire+0x3c70/0x3e00 [ 23.363112] panic+0x1e4/0x41c [ 23.363118] ? refcount_error_report+0x214/0x214 [ 23.363125] ? add_taint+0x40/0x50 [ 23.363130] ? add_taint+0x1c/0x50 [ 23.363137] ? __lock_acquire+0x3d4d/0x3e00 [ 23.363143] kasan_end_report+0x50/0x50 [ 23.363149] kasan_report+0x144/0x340 [ 23.363156] __asan_report_load8_noabort+0x14/0x20 [ 23.363162] __lock_acquire+0x3d4d/0x3e00 [ 23.363168] ? __lock_acquire+0x664/0x3e00 [ 23.363174] ? lock_downgrade+0x980/0x980 [ 23.363179] ? lock_downgrade+0x980/0x980 [ 23.363186] ? remove_wait_queue+0x81/0x350 [ 23.363195] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.363201] ? __lock_acquire+0x664/0x3e00 [ 23.363206] ? check_noncircular+0x20/0x20 [ 23.363218] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.363225] ? lock_acquire+0x1d5/0x580 [ 23.363230] ? lock_acquire+0x1d5/0x580 [ 23.363235] ? ep_free+0xf4/0x320 [ 23.363243] ? lock_release+0xa40/0xa40 [ 23.363249] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.363258] ? print_irqtrace_events+0x270/0x270 [ 23.363265] ? rcu_note_context_switch+0x710/0x710 [ 23.363272] ? __might_sleep+0x95/0x190 [ 23.363277] ? ep_free+0xf4/0x320 [ 23.363283] ? __mutex_lock+0x16f/0x1a80 [ 23.363288] ? ep_free+0xf4/0x320 [ 23.363295] ? print_irqtrace_events+0x270/0x270 [ 23.363299] ? ep_free+0xf4/0x320 [ 23.363307] lock_acquire+0x1d5/0x580 [ 23.363312] ? lock_acquire+0x1d5/0x580 [ 23.363318] ? remove_wait_queue+0x81/0x350 [ 23.363324] ? __lock_acquire+0x664/0x3e00 [ 23.363331] ? lock_release+0xa40/0xa40 [ 23.363340] ? lock_acquire+0x1d5/0x580 [ 23.363345] ? lock_acquire+0x1d5/0x580 [ 23.363351] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 23.363358] _raw_spin_lock_irqsave+0x96/0xc0 [ 23.363364] ? remove_wait_queue+0x81/0x350 [ 23.363370] remove_wait_queue+0x81/0x350 [ 23.363377] ? add_wait_queue+0x290/0x290 [ 23.363383] ? rcutorture_record_progress+0x10/0x10 [ 23.363393] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 23.363399] ? __kernel_text_address+0xd/0x40 [ 23.363407] ? clear_tfile_check_list+0x370/0x370 [ 23.363414] ? check_noncircular+0x20/0x20 [ 23.363422] ? locks_remove_file+0x3fa/0x5a0 [ 23.363431] ep_free+0x13f/0x320 [ 23.363437] ? ep_remove+0x800/0x800 [ 23.363442] ? fsnotify_first_mark+0x2b0/0x2b0 [ 23.363450] ? ep_free+0x320/0x320 [ 23.363456] ep_eventpoll_release+0x44/0x60 [ 23.363461] __fput+0x327/0x7e0 [ 23.363469] ? fput+0x140/0x140 [ 23.363476] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.363484] ____fput+0x15/0x20 [ 23.363490] task_work_run+0x199/0x270 [ 23.363498] ? task_work_cancel+0x210/0x210 [ 23.363504] ? _raw_spin_unlock+0x22/0x30 [ 23.363510] ? switch_task_namespaces+0x87/0xc0 [ 23.363517] do_exit+0x9bb/0x1ad0 [ 23.363524] ? binder_ioctl+0x551/0x1417 [ 23.363530] ? mm_update_next_owner+0x930/0x930 [ 23.363537] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 23.363545] ? avc_ss_reset+0x110/0x110 [ 23.363550] ? mutex_unlock+0xd/0x10 [ 23.363556] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 23.363574] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.363578] ? up_read+0x1a/0x40 [ 23.363585] ? rcu_note_context_switch+0x710/0x710 [ 23.363589] ? __fd_install+0x288/0x740 [ 23.363598] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 23.363603] ? do_vfs_ioctl+0x486/0x1520 [ 23.363608] ? _cond_resched+0x14/0x30 [ 23.363615] ? ioctl_preallocate+0x2b0/0x2b0 [ 23.363622] ? selinux_capable+0x40/0x40 [ 23.363628] ? __alloc_fd+0x750/0x750 [ 23.363636] do_group_exit+0x149/0x400 [ 23.363643] ? SyS_exit+0x30/0x30 [ 23.363649] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.363656] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.363663] SyS_exit_group+0x1d/0x20 [ 23.363669] entry_SYSCALL_64_fastpath+0x23/0x9a [ 23.363673] RIP: 0033:0x4429f8 [ 23.363676] RSP: 002b:00007fff40540a48 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 23.363681] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 23.363685] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 23.363688] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 23.363691] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 23.363694] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 23.382890] Dumping ftrace buffer: [ 23.382893] (ftrace buffer empty) [ 23.382896] Kernel Offset: disabled [ 24.504434] Rebooting in 86400 seconds..