[....] Starting enhanced syslogd: rsyslogd[ 10.902722] audit: type=1400 audit(1514241534.107:5): avc: denied { syslog } for pid=2990 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: [ 16.807673] audit: type=1400 audit(1514241540.012:6): avc: denied { map } for pid=3131 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 'ci-upstream-kasan-gce-7,10.128.0.22' (ECDSA) to the list of known hosts. executing program [ 23.016948] audit: type=1400 audit(1514241546.221:7): avc: denied { map } for pid=3145 comm="syzkaller721205" path="/root/syzkaller721205758" 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.021824] ================================================================== [ 23.021841] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 23.021846] Read of size 8 at addr ffff8801c9b04630 by task syzkaller721205/3145 [ 23.021847] [ 23.021855] CPU: 1 PID: 3145 Comm: syzkaller721205 Not tainted 4.15.0-rc5+ #237 [ 23.021859] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.021861] Call Trace: [ 23.021871] dump_stack+0x194/0x257 [ 23.021879] ? arch_local_irq_restore+0x53/0x53 [ 23.021888] ? show_regs_print_info+0x18/0x18 [ 23.021893] ? print_irqtrace_events+0x270/0x270 [ 23.021900] ? __lock_acquire+0x664/0x3e00 [ 23.021906] ? __lock_acquire+0x3d4d/0x3e00 [ 23.021915] print_address_description+0x73/0x250 [ 23.021921] ? __lock_acquire+0x3d4d/0x3e00 [ 23.021927] kasan_report+0x25b/0x340 [ 23.021935] __asan_report_load8_noabort+0x14/0x20 [ 23.021940] __lock_acquire+0x3d4d/0x3e00 [ 23.021946] ? __lock_acquire+0x664/0x3e00 [ 23.021951] ? lock_downgrade+0x980/0x980 [ 23.021956] ? lock_downgrade+0x980/0x980 [ 23.021965] ? remove_wait_queue+0x81/0x350 [ 23.021973] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.021980] ? __lock_acquire+0x664/0x3e00 [ 23.021985] ? check_noncircular+0x20/0x20 [ 23.021997] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.022008] ? lock_acquire+0x1d5/0x580 [ 23.022013] ? lock_acquire+0x1d5/0x580 [ 23.022020] ? ep_free+0xf4/0x320 [ 23.022029] ? lock_release+0xa40/0xa40 [ 23.022035] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.022041] ? print_irqtrace_events+0x270/0x270 [ 23.022048] ? rcu_note_context_switch+0x710/0x710 [ 23.022055] ? __might_sleep+0x95/0x190 [ 23.022061] ? ep_free+0xf4/0x320 [ 23.022067] ? __mutex_lock+0x16f/0x1a80 [ 23.022071] ? ep_free+0xf4/0x320 [ 23.022078] ? print_irqtrace_events+0x270/0x270 [ 23.022083] ? ep_free+0xf4/0x320 [ 23.022091] lock_acquire+0x1d5/0x580 [ 23.022096] ? lock_acquire+0x1d5/0x580 [ 23.022102] ? remove_wait_queue+0x81/0x350 [ 23.022108] ? __lock_acquire+0x664/0x3e00 [ 23.022115] ? lock_release+0xa40/0xa40 [ 23.022124] ? lock_acquire+0x1d5/0x580 [ 23.022129] ? lock_acquire+0x1d5/0x580 [ 23.022135] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 23.022143] _raw_spin_lock_irqsave+0x96/0xc0 [ 23.022148] ? remove_wait_queue+0x81/0x350 [ 23.022154] remove_wait_queue+0x81/0x350 [ 23.022162] ? add_wait_queue+0x290/0x290 [ 23.022168] ? rcutorture_record_progress+0x10/0x10 [ 23.022178] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 23.022185] ? __kernel_text_address+0xd/0x40 [ 23.022193] ? clear_tfile_check_list+0x370/0x370 [ 23.022200] ? check_noncircular+0x20/0x20 [ 23.022208] ? locks_remove_file+0x3fa/0x5a0 [ 23.022217] ep_free+0x13f/0x320 [ 23.022223] ? ep_remove+0x800/0x800 [ 23.022230] ? fsnotify_first_mark+0x2b0/0x2b0 [ 23.022237] ? ep_free+0x320/0x320 [ 23.022243] ep_eventpoll_release+0x44/0x60 [ 23.022249] __fput+0x327/0x7e0 [ 23.022257] ? fput+0x140/0x140 [ 23.022264] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.022272] ____fput+0x15/0x20 [ 23.022278] task_work_run+0x199/0x270 [ 23.022286] ? task_work_cancel+0x210/0x210 [ 23.022292] ? _raw_spin_unlock+0x22/0x30 [ 23.022298] ? switch_task_namespaces+0x87/0xc0 [ 23.022306] do_exit+0x9bb/0x1ad0 [ 23.022315] ? binder_ioctl+0x4a1/0x1417 [ 23.022321] ? mm_update_next_owner+0x930/0x930 [ 23.022329] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 23.022340] ? avc_ss_reset+0x110/0x110 [ 23.022345] ? mutex_unlock+0xd/0x10 [ 23.022351] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 23.022370] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.022374] ? up_read+0x1a/0x40 [ 23.022381] ? rcu_note_context_switch+0x710/0x710 [ 23.022387] ? __fd_install+0x288/0x740 [ 23.022396] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 23.022403] ? do_vfs_ioctl+0x486/0x1520 [ 23.022409] ? _cond_resched+0x14/0x30 [ 23.022417] ? ioctl_preallocate+0x2b0/0x2b0 [ 23.022425] ? selinux_capable+0x40/0x40 [ 23.022432] ? __alloc_fd+0x750/0x750 [ 23.022440] do_group_exit+0x149/0x400 [ 23.022446] ? SyS_exit+0x30/0x30 [ 23.022453] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.022461] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.022469] SyS_exit_group+0x1d/0x20 [ 23.022475] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.022480] RIP: 0033:0x4429f8 [ 23.022483] RSP: 002b:00007ffec8e46348 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 23.022490] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 23.022493] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 23.022497] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 23.022500] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 23.022504] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 23.022512] [ 23.022514] Allocated by task 3145: [ 23.022520] save_stack+0x43/0xd0 [ 23.022525] kasan_kmalloc+0xad/0xe0 [ 23.022531] kmem_cache_alloc_trace+0x136/0x750 [ 23.022536] binder_get_thread+0x1cf/0x870 [ 23.022540] binder_poll+0x8c/0x390 [ 23.022545] ep_item_poll.isra.10+0xec/0x320 [ 23.022549] ep_insert+0x6a3/0x1b10 [ 23.022554] SyS_epoll_ctl+0x12e4/0x1ab0 [ 23.022559] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.022560] [ 23.022562] Freed by task 3145: [ 23.022566] save_stack+0x43/0xd0 [ 23.022571] kasan_slab_free+0x71/0xc0 [ 23.022574] kfree+0xd6/0x260 [ 23.022579] binder_thread_dec_tmpref+0x27f/0x310 [ 23.022584] binder_thread_release+0x27d/0x540 [ 23.022589] binder_ioctl+0xc02/0x1417 [ 23.022594] do_vfs_ioctl+0x1b1/0x1520 [ 23.022599] SyS_ioctl+0x8f/0xc0 [ 23.022604] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.022605] [ 23.022609] The buggy address belongs to the object at ffff8801c9b04580 [ 23.022609] which belongs to the cache kmalloc-512 of size 512 [ 23.022614] The buggy address is located 176 bytes inside of [ 23.022614] 512-byte region [ffff8801c9b04580, ffff8801c9b04780) [ 23.022616] The buggy address belongs to the page: [ 23.022621] page:000000007a8aa119 count:1 mapcount:0 mapping:0000000004961fc5 index:0x0 [ 23.022626] flags: 0x2fffc0000000100(slab) [ 23.022639] raw: 02fffc0000000100 ffff8801c9b04080 0000000000000000 0000000100000006 [ 23.022646] raw: ffffea00072017a0 ffffea0007268920 ffff8801db000940 0000000000000000 [ 23.022648] page dumped because: kasan: bad access detected [ 23.022649] [ 23.022651] Memory state around the buggy address: [ 23.022655] ffff8801c9b04500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.022660] ffff8801c9b04580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.022664] >ffff8801c9b04600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.022666] ^ [ 23.022671] ffff8801c9b04680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.022675] ffff8801c9b04700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.022677] ================================================================== [ 23.022678] Disabling lock debugging due to kernel taint [ 23.022681] Kernel panic - not syncing: panic_on_warn set ... [ 23.022681] [ 23.022687] CPU: 1 PID: 3145 Comm: syzkaller721205 Tainted: G B 4.15.0-rc5+ #237 [ 23.022691] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.022692] Call Trace: [ 23.022698] dump_stack+0x194/0x257 [ 23.022705] ? arch_local_irq_restore+0x53/0x53 [ 23.022710] ? kasan_end_report+0x32/0x50 [ 23.022716] ? lock_downgrade+0x980/0x980 [ 23.022722] ? vsnprintf+0x1ed/0x1900 [ 23.022728] ? __lock_acquire+0x3cd0/0x3e00 [ 23.022733] panic+0x1e4/0x41c [ 23.022739] ? refcount_error_report+0x214/0x214 [ 23.022746] ? add_taint+0x40/0x50 [ 23.022751] ? add_taint+0x1c/0x50 [ 23.022758] ? __lock_acquire+0x3d4d/0x3e00 [ 23.022763] kasan_end_report+0x50/0x50 [ 23.022768] kasan_report+0x144/0x340 [ 23.022776] __asan_report_load8_noabort+0x14/0x20 [ 23.022782] __lock_acquire+0x3d4d/0x3e00 [ 23.022787] ? __lock_acquire+0x664/0x3e00 [ 23.022793] ? lock_downgrade+0x980/0x980 [ 23.022798] ? lock_downgrade+0x980/0x980 [ 23.022805] ? remove_wait_queue+0x81/0x350 [ 23.022814] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.022820] ? __lock_acquire+0x664/0x3e00 [ 23.022825] ? check_noncircular+0x20/0x20 [ 23.022837] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.022844] ? lock_acquire+0x1d5/0x580 [ 23.022849] ? lock_acquire+0x1d5/0x580 [ 23.022853] ? ep_free+0xf4/0x320 [ 23.022861] ? lock_release+0xa40/0xa40 [ 23.022868] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.022873] ? print_irqtrace_events+0x270/0x270 [ 23.022880] ? rcu_note_context_switch+0x710/0x710 [ 23.022886] ? __might_sleep+0x95/0x190 [ 23.022892] ? ep_free+0xf4/0x320 [ 23.022897] ? __mutex_lock+0x16f/0x1a80 [ 23.022901] ? ep_free+0xf4/0x320 [ 23.022908] ? print_irqtrace_events+0x270/0x270 [ 23.022912] ? ep_free+0xf4/0x320 [ 23.022920] lock_acquire+0x1d5/0x580 [ 23.022925] ? lock_acquire+0x1d5/0x580 [ 23.022931] ? remove_wait_queue+0x81/0x350 [ 23.022937] ? __lock_acquire+0x664/0x3e00 [ 23.022944] ? lock_release+0xa40/0xa40 [ 23.022952] ? lock_acquire+0x1d5/0x580 [ 23.022957] ? lock_acquire+0x1d5/0x580 [ 23.022963] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 23.022970] _raw_spin_lock_irqsave+0x96/0xc0 [ 23.022976] ? remove_wait_queue+0x81/0x350 [ 23.022982] remove_wait_queue+0x81/0x350 [ 23.022989] ? add_wait_queue+0x290/0x290 [ 23.022995] ? rcutorture_record_progress+0x10/0x10 [ 23.023004] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 23.023011] ? __kernel_text_address+0xd/0x40 [ 23.023018] ? clear_tfile_check_list+0x370/0x370 [ 23.023025] ? check_noncircular+0x20/0x20 [ 23.023032] ? locks_remove_file+0x3fa/0x5a0 [ 23.023041] ep_free+0x13f/0x320 [ 23.023046] ? ep_remove+0x800/0x800 [ 23.023052] ? fsnotify_first_mark+0x2b0/0x2b0 [ 23.023059] ? ep_free+0x320/0x320 [ 23.023065] ep_eventpoll_release+0x44/0x60 [ 23.023070] __fput+0x327/0x7e0 [ 23.023078] ? fput+0x140/0x140 [ 23.023084] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.023092] ____fput+0x15/0x20 [ 23.023098] task_work_run+0x199/0x270 [ 23.023105] ? task_work_cancel+0x210/0x210 [ 23.023111] ? _raw_spin_unlock+0x22/0x30 [ 23.023117] ? switch_task_namespaces+0x87/0xc0 [ 23.023125] do_exit+0x9bb/0x1ad0 [ 23.023132] ? binder_ioctl+0x4a1/0x1417 [ 23.023138] ? mm_update_next_owner+0x930/0x930 [ 23.023145] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 23.023154] ? avc_ss_reset+0x110/0x110 [ 23.023159] ? mutex_unlock+0xd/0x10 [ 23.023164] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 23.023182] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.023186] ? up_read+0x1a/0x40 [ 23.023193] ? rcu_note_context_switch+0x710/0x710 [ 23.023198] ? __fd_install+0x288/0x740 [ 23.023207] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 23.023213] ? do_vfs_ioctl+0x486/0x1520 [ 23.023218] ? _cond_resched+0x14/0x30 [ 23.023226] ? ioctl_preallocate+0x2b0/0x2b0 [ 23.023233] ? selinux_capable+0x40/0x40 [ 23.023240] ? __alloc_fd+0x750/0x750 [ 23.023248] do_group_exit+0x149/0x400 [ 23.023254] ? SyS_exit+0x30/0x30 [ 23.023261] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.023267] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.023274] SyS_exit_group+0x1d/0x20 [ 23.023280] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.023284] RIP: 0033:0x4429f8 [ 23.023287] RSP: 002b:00007ffec8e46348 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 23.023293] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 23.023296] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 23.023300] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 23.023303] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 23.023306] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 23.043607] Dumping ftrace buffer: [ 23.043611] (ftrace buffer empty) [ 23.043613] Kernel Offset: disabled [ 24.179438] Rebooting in 86400 seconds..