[....] Starting enhanced syslogd: rsyslogd[ 9.765324] audit: type=1400 audit(1513690524.969:5): avc: denied { syslog } for pid=2984 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 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: [ 12.970236] audit: type=1400 audit(1513690528.174:6): avc: denied { map } for pid=3124 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-3,10.128.0.63' (ECDSA) to the list of known hosts. executing program [ 36.945696] audit: type=1400 audit(1513690552.149:7): avc: denied { map } for pid=3143 comm="syzkaller595810" path="/root/syzkaller595810296" 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 [ 36.949274] ================================================================== [ 36.949284] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 36.949288] Read of size 8 at addr ffff8801ca7618b0 by task syzkaller595810/3143 [ 36.949289] [ 36.949295] CPU: 1 PID: 3143 Comm: syzkaller595810 Not tainted 4.15.0-rc4+ #228 [ 36.949298] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.949299] Call Trace: [ 36.949306] dump_stack+0x194/0x257 [ 36.949312] ? arch_local_irq_restore+0x53/0x53 [ 36.949317] ? show_regs_print_info+0x18/0x18 [ 36.949320] ? print_irqtrace_events+0x270/0x270 [ 36.949324] ? __lock_acquire+0x664/0x3e00 [ 36.949328] ? __lock_acquire+0x3d4d/0x3e00 [ 36.949333] print_address_description+0x73/0x250 [ 36.949337] ? __lock_acquire+0x3d4d/0x3e00 [ 36.949340] kasan_report+0x25b/0x340 [ 36.949345] __asan_report_load8_noabort+0x14/0x20 [ 36.949349] __lock_acquire+0x3d4d/0x3e00 [ 36.949352] ? __lock_acquire+0x664/0x3e00 [ 36.949355] ? lock_downgrade+0x980/0x980 [ 36.949358] ? lock_downgrade+0x980/0x980 [ 36.949364] ? remove_wait_queue+0x81/0x350 [ 36.949370] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 36.949374] ? __lock_acquire+0x664/0x3e00 [ 36.949377] ? check_noncircular+0x20/0x20 [ 36.949385] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 36.949389] ? lock_acquire+0x1d5/0x580 [ 36.949392] ? lock_acquire+0x1d5/0x580 [ 36.949396] ? ep_free+0xf4/0x320 [ 36.949401] ? lock_release+0xa40/0xa40 [ 36.949406] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 36.949409] ? print_irqtrace_events+0x270/0x270 [ 36.949415] ? rcu_note_context_switch+0x710/0x710 [ 36.949419] ? __might_sleep+0x95/0x190 [ 36.949423] ? ep_free+0xf4/0x320 [ 36.949429] ? __mutex_lock+0x16f/0x1a80 [ 36.949431] ? ep_free+0xf4/0x320 [ 36.949436] ? print_irqtrace_events+0x270/0x270 [ 36.949438] ? ep_free+0xf4/0x320 [ 36.949443] lock_acquire+0x1d5/0x580 [ 36.949446] ? lock_acquire+0x1d5/0x580 [ 36.949450] ? remove_wait_queue+0x81/0x350 [ 36.949453] ? __lock_acquire+0x664/0x3e00 [ 36.949458] ? lock_release+0xa40/0xa40 [ 36.949463] ? lock_acquire+0x1d5/0x580 [ 36.949466] ? lock_acquire+0x1d5/0x580 [ 36.949471] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 36.949476] _raw_spin_lock_irqsave+0x96/0xc0 [ 36.949479] ? remove_wait_queue+0x81/0x350 [ 36.949483] remove_wait_queue+0x81/0x350 [ 36.949488] ? add_wait_queue+0x290/0x290 [ 36.949491] ? rcutorture_record_progress+0x10/0x10 [ 36.949498] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 36.949504] ? __kernel_text_address+0xd/0x40 [ 36.949509] ? clear_tfile_check_list+0x370/0x370 [ 36.949514] ? check_noncircular+0x20/0x20 [ 36.949519] ? locks_remove_file+0x3fa/0x5a0 [ 36.949524] ep_free+0x13f/0x320 [ 36.949527] ? ep_remove+0x800/0x800 [ 36.949531] ? fsnotify_first_mark+0x2b0/0x2b0 [ 36.949536] ? ep_free+0x320/0x320 [ 36.949539] ep_eventpoll_release+0x44/0x60 [ 36.949544] __fput+0x327/0x7e0 [ 36.949551] ? fput+0x140/0x140 [ 36.949557] ? _raw_spin_unlock_irq+0x27/0x70 [ 36.949563] ____fput+0x15/0x20 [ 36.949567] task_work_run+0x199/0x270 [ 36.949572] ? task_work_cancel+0x210/0x210 [ 36.949576] ? _raw_spin_unlock+0x22/0x30 [ 36.949580] ? switch_task_namespaces+0x87/0xc0 [ 36.949585] do_exit+0x9bb/0x1ad0 [ 36.949591] ? binder_ioctl+0x4e1/0x1417 [ 36.949594] ? mm_update_next_owner+0x930/0x930 [ 36.949599] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 36.949606] ? avc_ss_reset+0x110/0x110 [ 36.949610] ? mutex_unlock+0xd/0x10 [ 36.949613] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 36.949630] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 36.949633] ? up_read+0x1a/0x40 [ 36.949637] ? rcu_note_context_switch+0x710/0x710 [ 36.949641] ? __fd_install+0x288/0x740 [ 36.949647] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 36.949651] ? do_vfs_ioctl+0x486/0x1520 [ 36.949654] ? _cond_resched+0x14/0x30 [ 36.949659] ? ioctl_preallocate+0x2b0/0x2b0 [ 36.949665] ? selinux_capable+0x40/0x40 [ 36.949669] ? __alloc_fd+0x750/0x750 [ 36.949674] do_group_exit+0x149/0x400 [ 36.949678] ? SyS_exit+0x30/0x30 [ 36.949682] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 36.949687] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 36.949692] SyS_exit_group+0x1d/0x20 [ 36.949696] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.949699] RIP: 0033:0x4429f8 [ 36.949701] RSP: 002b:00007fff73093dc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 36.949705] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 36.949707] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 36.949710] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 36.949712] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 36.949714] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 36.949719] [ 36.949721] Allocated by task 3143: [ 36.949724] save_stack+0x43/0xd0 [ 36.949727] kasan_kmalloc+0xad/0xe0 [ 36.949731] kmem_cache_alloc_trace+0x136/0x750 [ 36.949734] binder_get_thread+0x1cf/0x870 [ 36.949737] binder_poll+0x8c/0x390 [ 36.949739] ep_item_poll.isra.10+0xec/0x320 [ 36.949742] ep_insert+0x6a3/0x1b10 [ 36.949744] SyS_epoll_ctl+0x12e4/0x1ab0 [ 36.949747] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.949748] [ 36.949749] Freed by task 3143: [ 36.949752] save_stack+0x43/0xd0 [ 36.949754] kasan_slab_free+0x71/0xc0 [ 36.949757] kfree+0xca/0x250 [ 36.949760] binder_thread_dec_tmpref+0x27f/0x310 [ 36.949763] binder_thread_release+0x27d/0x540 [ 36.949765] binder_ioctl+0xc02/0x1417 [ 36.949768] do_vfs_ioctl+0x1b1/0x1520 [ 36.949771] SyS_ioctl+0x8f/0xc0 [ 36.949774] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.949775] [ 36.949777] The buggy address belongs to the object at ffff8801ca761800 [ 36.949777] which belongs to the cache kmalloc-512 of size 512 [ 36.949781] The buggy address is located 176 bytes inside of [ 36.949781] 512-byte region [ffff8801ca761800, ffff8801ca761a00) [ 36.949782] The buggy address belongs to the page: [ 36.949786] page:000000001aaaa6ef count:1 mapcount:0 mapping:00000000b1bfc8ad index:0x0 [ 36.949790] flags: 0x2fffc0000000100(slab) [ 36.949796] raw: 02fffc0000000100 ffff8801ca761080 0000000000000000 0000000100000006 [ 36.949800] raw: ffffea0007249ca0 ffffea0007227960 ffff8801db000940 0000000000000000 [ 36.949802] page dumped because: kasan: bad access detected [ 36.949802] [ 36.949803] Memory state around the buggy address: [ 36.949806] ffff8801ca761780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 36.949809] ffff8801ca761800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.949811] >ffff8801ca761880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.949813] ^ [ 36.949815] ffff8801ca761900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.949818] ffff8801ca761980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.949819] ================================================================== [ 36.949820] Disabling lock debugging due to kernel taint [ 36.949822] Kernel panic - not syncing: panic_on_warn set ... [ 36.949822] [ 36.949826] CPU: 1 PID: 3143 Comm: syzkaller595810 Tainted: G B 4.15.0-rc4+ #228 [ 36.949828] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.949829] Call Trace: [ 36.949833] dump_stack+0x194/0x257 [ 36.949838] ? arch_local_irq_restore+0x53/0x53 [ 36.949841] ? kasan_end_report+0x32/0x50 [ 36.949845] ? lock_downgrade+0x980/0x980 [ 36.949848] ? vsnprintf+0x1ed/0x1900 [ 36.949852] ? __lock_acquire+0x3c90/0x3e00 [ 36.949856] panic+0x1e4/0x41c [ 36.949859] ? refcount_error_report+0x214/0x214 [ 36.949863] ? add_taint+0x40/0x50 [ 36.949866] ? add_taint+0x1c/0x50 [ 36.949870] ? __lock_acquire+0x3d4d/0x3e00 [ 36.949874] kasan_end_report+0x50/0x50 [ 36.949877] kasan_report+0x144/0x340 [ 36.949881] __asan_report_load8_noabort+0x14/0x20 [ 36.949885] __lock_acquire+0x3d4d/0x3e00 [ 36.949888] ? __lock_acquire+0x664/0x3e00 [ 36.949891] ? lock_downgrade+0x980/0x980 [ 36.949894] ? lock_downgrade+0x980/0x980 [ 36.949898] ? remove_wait_queue+0x81/0x350 [ 36.949903] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 36.949907] ? __lock_acquire+0x664/0x3e00 [ 36.949910] ? check_noncircular+0x20/0x20 [ 36.949917] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 36.949921] ? lock_acquire+0x1d5/0x580 [ 36.949924] ? lock_acquire+0x1d5/0x580 [ 36.949927] ? ep_free+0xf4/0x320 [ 36.949931] ? lock_release+0xa40/0xa40 [ 36.949935] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 36.949938] ? print_irqtrace_events+0x270/0x270 [ 36.949942] ? rcu_note_context_switch+0x710/0x710 [ 36.949946] ? __might_sleep+0x95/0x190 [ 36.949949] ? ep_free+0xf4/0x320 [ 36.949953] ? __mutex_lock+0x16f/0x1a80 [ 36.949955] ? ep_free+0xf4/0x320 [ 36.949959] ? print_irqtrace_events+0x270/0x270 [ 36.949962] ? ep_free+0xf4/0x320 [ 36.949966] lock_acquire+0x1d5/0x580 [ 36.949969] ? lock_acquire+0x1d5/0x580 [ 36.949973] ? remove_wait_queue+0x81/0x350 [ 36.949976] ? __lock_acquire+0x664/0x3e00 [ 36.949980] ? lock_release+0xa40/0xa40 [ 36.949985] ? lock_acquire+0x1d5/0x580 [ 36.949989] ? lock_acquire+0x1d5/0x580 [ 36.949993] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 36.949997] _raw_spin_lock_irqsave+0x96/0xc0 [ 36.950004] ? remove_wait_queue+0x81/0x350 [ 36.950008] remove_wait_queue+0x81/0x350 [ 36.950012] ? add_wait_queue+0x290/0x290 [ 36.950015] ? rcutorture_record_progress+0x10/0x10 [ 36.950022] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 36.950026] ? __kernel_text_address+0xd/0x40 [ 36.950031] ? clear_tfile_check_list+0x370/0x370 [ 36.950035] ? check_noncircular+0x20/0x20 [ 36.950039] ? locks_remove_file+0x3fa/0x5a0 [ 36.950044] ep_free+0x13f/0x320 [ 36.950047] ? ep_remove+0x800/0x800 [ 36.950051] ? fsnotify_first_mark+0x2b0/0x2b0 [ 36.950055] ? ep_free+0x320/0x320 [ 36.950058] ep_eventpoll_release+0x44/0x60 [ 36.950061] __fput+0x327/0x7e0 [ 36.950065] ? fput+0x140/0x140 [ 36.950069] ? _raw_spin_unlock_irq+0x27/0x70 [ 36.950073] ____fput+0x15/0x20 [ 36.950077] task_work_run+0x199/0x270 [ 36.950081] ? task_work_cancel+0x210/0x210 [ 36.950085] ? _raw_spin_unlock+0x22/0x30 [ 36.950088] ? switch_task_namespaces+0x87/0xc0 [ 36.950092] do_exit+0x9bb/0x1ad0 [ 36.950096] ? binder_ioctl+0x4e1/0x1417 [ 36.950100] ? mm_update_next_owner+0x930/0x930 [ 36.950104] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 36.950109] ? avc_ss_reset+0x110/0x110 [ 36.950113] ? mutex_unlock+0xd/0x10 [ 36.950116] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 36.950126] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 36.950129] ? up_read+0x1a/0x40 [ 36.950133] ? rcu_note_context_switch+0x710/0x710 [ 36.950136] ? __fd_install+0x288/0x740 [ 36.950141] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 36.950144] ? do_vfs_ioctl+0x486/0x1520 [ 36.950147] ? _cond_resched+0x14/0x30 [ 36.950152] ? ioctl_preallocate+0x2b0/0x2b0 [ 36.950156] ? selinux_capable+0x40/0x40 [ 36.950160] ? __alloc_fd+0x750/0x750 [ 36.950165] do_group_exit+0x149/0x400 [ 36.950168] ? SyS_exit+0x30/0x30 [ 36.950172] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 36.950176] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 36.950181] SyS_exit_group+0x1d/0x20 [ 36.950184] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.950186] RIP: 0033:0x4429f8 [ 36.950188] RSP: 002b:00007fff73093dc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 36.950192] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 36.950194] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 36.950196] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 36.950198] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 36.950200] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 36.971580] Dumping ftrace buffer: [ 36.971584] (ftrace buffer empty) [ 36.971585] Kernel Offset: disabled [ 38.093640] Rebooting in 86400 seconds..