[....] Starting enhanced syslogd: rsyslogd[ 11.444493] audit: type=1400 audit(1514234454.197:5): avc: denied { syslog } for pid=2995 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.050653] audit: type=1400 audit(1514234458.803:6): avc: denied { map } for pid=3135 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-1,10.128.0.5' (ECDSA) to the list of known hosts. executing program [ 25.626795] audit: type=1400 audit(1514234468.379:7): avc: denied { map } for pid=3150 comm="syzkaller887872" path="/root/syzkaller887872235" 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.630465] ================================================================== [ 25.630480] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 25.630484] Read of size 8 at addr ffff8801c97fbd30 by task syzkaller887872/3150 [ 25.630485] [ 25.630491] CPU: 1 PID: 3150 Comm: syzkaller887872 Not tainted 4.15.0-rc5+ #237 [ 25.630493] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.630495] Call Trace: [ 25.630504] dump_stack+0x194/0x257 [ 25.630509] ? arch_local_irq_restore+0x53/0x53 [ 25.630516] ? show_regs_print_info+0x18/0x18 [ 25.630519] ? print_irqtrace_events+0x270/0x270 [ 25.630523] ? __lock_acquire+0x664/0x3e00 [ 25.630527] ? __lock_acquire+0x3d4d/0x3e00 [ 25.630534] print_address_description+0x73/0x250 [ 25.630537] ? __lock_acquire+0x3d4d/0x3e00 [ 25.630541] kasan_report+0x25b/0x340 [ 25.630546] __asan_report_load8_noabort+0x14/0x20 [ 25.630549] __lock_acquire+0x3d4d/0x3e00 [ 25.630552] ? __lock_acquire+0x664/0x3e00 [ 25.630556] ? lock_downgrade+0x980/0x980 [ 25.630559] ? lock_downgrade+0x980/0x980 [ 25.630566] ? remove_wait_queue+0x81/0x350 [ 25.630571] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.630575] ? __lock_acquire+0x664/0x3e00 [ 25.630578] ? check_noncircular+0x20/0x20 [ 25.630585] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.630590] ? lock_acquire+0x1d5/0x580 [ 25.630593] ? lock_acquire+0x1d5/0x580 [ 25.630598] ? ep_free+0xf4/0x320 [ 25.630603] ? lock_release+0xa40/0xa40 [ 25.630609] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.630612] ? print_irqtrace_events+0x270/0x270 [ 25.630618] ? rcu_note_context_switch+0x710/0x710 [ 25.630623] ? __might_sleep+0x95/0x190 [ 25.630626] ? ep_free+0xf4/0x320 [ 25.630630] ? __mutex_lock+0x16f/0x1a80 [ 25.630633] ? ep_free+0xf4/0x320 [ 25.630637] ? print_irqtrace_events+0x270/0x270 [ 25.630639] ? ep_free+0xf4/0x320 [ 25.630644] lock_acquire+0x1d5/0x580 [ 25.630647] ? lock_acquire+0x1d5/0x580 [ 25.630651] ? remove_wait_queue+0x81/0x350 [ 25.630654] ? __lock_acquire+0x664/0x3e00 [ 25.630658] ? lock_release+0xa40/0xa40 [ 25.630664] ? lock_acquire+0x1d5/0x580 [ 25.630667] ? lock_acquire+0x1d5/0x580 [ 25.630670] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.630676] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.630679] ? remove_wait_queue+0x81/0x350 [ 25.630683] remove_wait_queue+0x81/0x350 [ 25.630687] ? add_wait_queue+0x290/0x290 [ 25.630691] ? rcutorture_record_progress+0x10/0x10 [ 25.630697] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.630704] ? __kernel_text_address+0xd/0x40 [ 25.630708] ? clear_tfile_check_list+0x370/0x370 [ 25.630713] ? check_noncircular+0x20/0x20 [ 25.630719] ? locks_remove_file+0x3fa/0x5a0 [ 25.630724] ep_free+0x13f/0x320 [ 25.630728] ? ep_remove+0x800/0x800 [ 25.630733] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.630737] ? ep_free+0x320/0x320 [ 25.630741] ep_eventpoll_release+0x44/0x60 [ 25.630746] __fput+0x327/0x7e0 [ 25.630750] ? fput+0x140/0x140 [ 25.630754] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.630759] ____fput+0x15/0x20 [ 25.630763] task_work_run+0x199/0x270 [ 25.630768] ? task_work_cancel+0x210/0x210 [ 25.630771] ? _raw_spin_unlock+0x22/0x30 [ 25.630775] ? switch_task_namespaces+0x87/0xc0 [ 25.630782] do_exit+0x9bb/0x1ad0 [ 25.630788] ? binder_ioctl+0x4a1/0x1417 [ 25.630792] ? mm_update_next_owner+0x930/0x930 [ 25.630797] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 25.630804] ? avc_ss_reset+0x110/0x110 [ 25.630807] ? mutex_unlock+0xd/0x10 [ 25.630810] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 25.630822] ? vmacache_update+0xfe/0x130 [ 25.630827] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.630830] ? up_read+0x1a/0x40 [ 25.630834] ? rcu_note_context_switch+0x710/0x710 [ 25.630838] ? __fd_install+0x288/0x740 [ 25.630844] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 25.630848] ? do_vfs_ioctl+0x486/0x1520 [ 25.630852] ? _cond_resched+0x14/0x30 [ 25.630857] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.630862] ? selinux_capable+0x40/0x40 [ 25.630866] ? __alloc_fd+0x750/0x750 [ 25.630871] do_group_exit+0x149/0x400 [ 25.630875] ? SyS_exit+0x30/0x30 [ 25.630879] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.630885] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.630889] SyS_exit_group+0x1d/0x20 [ 25.630893] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 25.630897] RIP: 0033:0x4429f8 [ 25.630899] RSP: 002b:00007ffc2e1136e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.630903] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.630905] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.630907] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.630909] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.630911] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.630921] [ 25.630923] Allocated by task 3150: [ 25.630926] save_stack+0x43/0xd0 [ 25.630929] kasan_kmalloc+0xad/0xe0 [ 25.630936] kmem_cache_alloc_trace+0x136/0x750 [ 25.630940] binder_get_thread+0x1cf/0x870 [ 25.630942] binder_poll+0x8c/0x390 [ 25.630945] ep_item_poll.isra.10+0xec/0x320 [ 25.630947] ep_insert+0x6a3/0x1b10 [ 25.630950] SyS_epoll_ctl+0x12e4/0x1ab0 [ 25.630953] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 25.630954] [ 25.630955] Freed by task 3150: [ 25.630958] save_stack+0x43/0xd0 [ 25.630960] kasan_slab_free+0x71/0xc0 [ 25.630963] kfree+0xd6/0x260 [ 25.630966] binder_thread_dec_tmpref+0x27f/0x310 [ 25.630968] binder_thread_release+0x27d/0x540 [ 25.630971] binder_ioctl+0xc02/0x1417 [ 25.630974] do_vfs_ioctl+0x1b1/0x1520 [ 25.630977] SyS_ioctl+0x8f/0xc0 [ 25.630980] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 25.630981] [ 25.630984] The buggy address belongs to the object at ffff8801c97fbc80 [ 25.630984] which belongs to the cache kmalloc-512 of size 512 [ 25.630987] The buggy address is located 176 bytes inside of [ 25.630987] 512-byte region [ffff8801c97fbc80, ffff8801c97fbe80) [ 25.630988] The buggy address belongs to the page: [ 25.630993] page:000000006d1d3099 count:1 mapcount:0 mapping:0000000096e0fcbb index:0x0 [ 25.630997] flags: 0x2fffc0000000100(slab) [ 25.631005] raw: 02fffc0000000100 ffff8801c97fb000 0000000000000000 0000000100000006 [ 25.631009] raw: ffffea000729afa0 ffffea000729dc20 ffff8801db000940 0000000000000000 [ 25.631011] page dumped because: kasan: bad access detected [ 25.631012] [ 25.631012] Memory state around the buggy address: [ 25.631015] ffff8801c97fbc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.631018] ffff8801c97fbc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.631020] >ffff8801c97fbd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.631022] ^ [ 25.631024] ffff8801c97fbd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.631026] ffff8801c97fbe00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.631027] ================================================================== [ 25.631029] Disabling lock debugging due to kernel taint [ 25.631031] Kernel panic - not syncing: panic_on_warn set ... [ 25.631031] [ 25.631035] CPU: 1 PID: 3150 Comm: syzkaller887872 Tainted: G B 4.15.0-rc5+ #237 [ 25.631037] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.631038] Call Trace: [ 25.631042] dump_stack+0x194/0x257 [ 25.631046] ? arch_local_irq_restore+0x53/0x53 [ 25.631049] ? kasan_end_report+0x32/0x50 [ 25.631053] ? lock_downgrade+0x980/0x980 [ 25.631056] ? vsnprintf+0x1ed/0x1900 [ 25.631059] ? __lock_acquire+0x3cd0/0x3e00 [ 25.631063] panic+0x1e4/0x41c [ 25.631066] ? refcount_error_report+0x214/0x214 [ 25.631070] ? add_taint+0x40/0x50 [ 25.631073] ? add_taint+0x1c/0x50 [ 25.631077] ? __lock_acquire+0x3d4d/0x3e00 [ 25.631080] kasan_end_report+0x50/0x50 [ 25.631083] kasan_report+0x144/0x340 [ 25.631088] __asan_report_load8_noabort+0x14/0x20 [ 25.631091] __lock_acquire+0x3d4d/0x3e00 [ 25.631094] ? __lock_acquire+0x664/0x3e00 [ 25.631097] ? lock_downgrade+0x980/0x980 [ 25.631100] ? lock_downgrade+0x980/0x980 [ 25.631104] ? remove_wait_queue+0x81/0x350 [ 25.631109] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.631113] ? __lock_acquire+0x664/0x3e00 [ 25.631116] ? check_noncircular+0x20/0x20 [ 25.631122] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.631126] ? lock_acquire+0x1d5/0x580 [ 25.631129] ? lock_acquire+0x1d5/0x580 [ 25.631132] ? ep_free+0xf4/0x320 [ 25.631137] ? lock_release+0xa40/0xa40 [ 25.631140] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.631144] ? print_irqtrace_events+0x270/0x270 [ 25.631147] ? rcu_note_context_switch+0x710/0x710 [ 25.631151] ? __might_sleep+0x95/0x190 [ 25.631154] ? ep_free+0xf4/0x320 [ 25.631157] ? __mutex_lock+0x16f/0x1a80 [ 25.631160] ? ep_free+0xf4/0x320 [ 25.631164] ? print_irqtrace_events+0x270/0x270 [ 25.631166] ? ep_free+0xf4/0x320 [ 25.631171] lock_acquire+0x1d5/0x580 [ 25.631174] ? lock_acquire+0x1d5/0x580 [ 25.631177] ? remove_wait_queue+0x81/0x350 [ 25.631180] ? __lock_acquire+0x664/0x3e00 [ 25.631184] ? lock_release+0xa40/0xa40 [ 25.631189] ? lock_acquire+0x1d5/0x580 [ 25.631192] ? lock_acquire+0x1d5/0x580 [ 25.631196] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.631200] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.631203] ? remove_wait_queue+0x81/0x350 [ 25.631207] remove_wait_queue+0x81/0x350 [ 25.631211] ? add_wait_queue+0x290/0x290 [ 25.631214] ? rcutorture_record_progress+0x10/0x10 [ 25.631219] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.631223] ? __kernel_text_address+0xd/0x40 [ 25.631227] ? clear_tfile_check_list+0x370/0x370 [ 25.631232] ? check_noncircular+0x20/0x20 [ 25.631236] ? locks_remove_file+0x3fa/0x5a0 [ 25.631241] ep_free+0x13f/0x320 [ 25.631244] ? ep_remove+0x800/0x800 [ 25.631247] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.631251] ? ep_free+0x320/0x320 [ 25.631255] ep_eventpoll_release+0x44/0x60 [ 25.631258] __fput+0x327/0x7e0 [ 25.631262] ? fput+0x140/0x140 [ 25.631266] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.631270] ____fput+0x15/0x20 [ 25.631274] task_work_run+0x199/0x270 [ 25.631278] ? task_work_cancel+0x210/0x210 [ 25.631281] ? _raw_spin_unlock+0x22/0x30 [ 25.631285] ? switch_task_namespaces+0x87/0xc0 [ 25.631289] do_exit+0x9bb/0x1ad0 [ 25.631293] ? binder_ioctl+0x4a1/0x1417 [ 25.631297] ? mm_update_next_owner+0x930/0x930 [ 25.631301] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 25.631306] ? avc_ss_reset+0x110/0x110 [ 25.631309] ? mutex_unlock+0xd/0x10 [ 25.631312] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 25.631321] ? vmacache_update+0xfe/0x130 [ 25.631325] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.631328] ? up_read+0x1a/0x40 [ 25.631332] ? rcu_note_context_switch+0x710/0x710 [ 25.631335] ? __fd_install+0x288/0x740 [ 25.631340] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 25.631344] ? do_vfs_ioctl+0x486/0x1520 [ 25.631347] ? _cond_resched+0x14/0x30 [ 25.631352] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.631355] ? selinux_capable+0x40/0x40 [ 25.631359] ? __alloc_fd+0x750/0x750 [ 25.631364] do_group_exit+0x149/0x400 [ 25.631368] ? SyS_exit+0x30/0x30 [ 25.631372] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.631375] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.631380] SyS_exit_group+0x1d/0x20 [ 25.631383] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 25.631385] RIP: 0033:0x4429f8 [ 25.631387] RSP: 002b:00007ffc2e1136e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.631391] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.631393] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.631395] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.631396] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.631398] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.652716] Dumping ftrace buffer: [ 25.652722] (ftrace buffer empty) [ 25.652725] Kernel Offset: disabled [ 26.784253] Rebooting in 86400 seconds..