[....] Starting enhanced syslogd: rsyslogd[ 10.519711] audit: type=1400 audit(1514103285.227:5): avc: denied { syslog } for pid=2987 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: [ 16.758460] audit: type=1400 audit(1514103291.466:6): avc: denied { map } for pid=3129 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-8,10.128.0.25' (ECDSA) to the list of known hosts. executing program [ 22.966686] audit: type=1400 audit(1514103297.674:7): avc: denied { map } for pid=3143 comm="syzkaller573437" path="/root/syzkaller573437204" 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 [ 22.971060] ================================================================== [ 22.971073] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 22.971076] Read of size 8 at addr ffff8801ca520870 by task syzkaller573437/3143 [ 22.971077] [ 22.971082] CPU: 1 PID: 3143 Comm: syzkaller573437 Not tainted 4.15.0-rc4+ #236 [ 22.971084] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.971085] Call Trace: [ 22.971093] dump_stack+0x194/0x257 [ 22.971098] ? arch_local_irq_restore+0x53/0x53 [ 22.971105] ? show_regs_print_info+0x18/0x18 [ 22.971110] ? print_irqtrace_events+0x270/0x270 [ 22.971115] ? __lock_acquire+0x664/0x3e00 [ 22.971120] ? __lock_acquire+0x3d4d/0x3e00 [ 22.971126] print_address_description+0x73/0x250 [ 22.971129] ? __lock_acquire+0x3d4d/0x3e00 [ 22.971133] kasan_report+0x25b/0x340 [ 22.971137] __asan_report_load8_noabort+0x14/0x20 [ 22.971141] __lock_acquire+0x3d4d/0x3e00 [ 22.971144] ? __lock_acquire+0x664/0x3e00 [ 22.971147] ? lock_downgrade+0x980/0x980 [ 22.971150] ? lock_downgrade+0x980/0x980 [ 22.971156] ? remove_wait_queue+0x81/0x350 [ 22.971161] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.971165] ? __lock_acquire+0x664/0x3e00 [ 22.971168] ? check_noncircular+0x20/0x20 [ 22.971176] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.971180] ? lock_acquire+0x1d5/0x580 [ 22.971183] ? lock_acquire+0x1d5/0x580 [ 22.971187] ? ep_free+0xf4/0x320 [ 22.971192] ? lock_release+0xa40/0xa40 [ 22.971197] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.971200] ? print_irqtrace_events+0x270/0x270 [ 22.971205] ? rcu_note_context_switch+0x710/0x710 [ 22.971210] ? __might_sleep+0x95/0x190 [ 22.971213] ? ep_free+0xf4/0x320 [ 22.971217] ? __mutex_lock+0x16f/0x1a80 [ 22.971220] ? ep_free+0xf4/0x320 [ 22.971224] ? print_irqtrace_events+0x270/0x270 [ 22.971226] ? ep_free+0xf4/0x320 [ 22.971231] lock_acquire+0x1d5/0x580 [ 22.971234] ? lock_acquire+0x1d5/0x580 [ 22.971238] ? remove_wait_queue+0x81/0x350 [ 22.971241] ? __lock_acquire+0x664/0x3e00 [ 22.971245] ? lock_release+0xa40/0xa40 [ 22.971251] ? lock_acquire+0x1d5/0x580 [ 22.971254] ? lock_acquire+0x1d5/0x580 [ 22.971257] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.971262] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.971266] ? remove_wait_queue+0x81/0x350 [ 22.971269] remove_wait_queue+0x81/0x350 [ 22.971274] ? add_wait_queue+0x290/0x290 [ 22.971278] ? rcutorture_record_progress+0x10/0x10 [ 22.971283] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.971290] ? __kernel_text_address+0xd/0x40 [ 22.971294] ? clear_tfile_check_list+0x370/0x370 [ 22.971299] ? check_noncircular+0x20/0x20 [ 22.971304] ? locks_remove_file+0x3fa/0x5a0 [ 22.971309] ep_free+0x13f/0x320 [ 22.971312] ? ep_remove+0x800/0x800 [ 22.971318] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.971322] ? ep_free+0x320/0x320 [ 22.971325] ep_eventpoll_release+0x44/0x60 [ 22.971330] __fput+0x327/0x7e0 [ 22.971335] ? fput+0x140/0x140 [ 22.971339] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.971343] ____fput+0x15/0x20 [ 22.971347] task_work_run+0x199/0x270 [ 22.971352] ? task_work_cancel+0x210/0x210 [ 22.971355] ? _raw_spin_unlock+0x22/0x30 [ 22.971359] ? switch_task_namespaces+0x87/0xc0 [ 22.971365] do_exit+0x9bb/0x1ad0 [ 22.971371] ? binder_ioctl+0x4a1/0x1417 [ 22.971375] ? mm_update_next_owner+0x930/0x930 [ 22.971379] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.971386] ? avc_ss_reset+0x110/0x110 [ 22.971389] ? mutex_unlock+0xd/0x10 [ 22.971392] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 22.971404] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.971407] ? up_read+0x1a/0x40 [ 22.971411] ? rcu_note_context_switch+0x710/0x710 [ 22.971415] ? __fd_install+0x288/0x740 [ 22.971420] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.971424] ? do_vfs_ioctl+0x486/0x1520 [ 22.971428] ? _cond_resched+0x14/0x30 [ 22.971433] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.971437] ? selinux_capable+0x40/0x40 [ 22.971441] ? __alloc_fd+0x750/0x750 [ 22.971446] do_group_exit+0x149/0x400 [ 22.971450] ? SyS_exit+0x30/0x30 [ 22.971454] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.971459] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.971464] SyS_exit_group+0x1d/0x20 [ 22.971468] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.971471] RIP: 0033:0x4429f8 [ 22.971473] RSP: 002b:00007ffc7741b5e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.971477] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.971479] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.971481] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.971484] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.971485] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.971491] [ 22.971492] Allocated by task 3143: [ 22.971496] save_stack+0x43/0xd0 [ 22.971498] kasan_kmalloc+0xad/0xe0 [ 22.971503] kmem_cache_alloc_trace+0x136/0x750 [ 22.971506] binder_get_thread+0x1cf/0x870 [ 22.971509] binder_poll+0x8c/0x390 [ 22.971511] ep_item_poll.isra.10+0xec/0x320 [ 22.971514] ep_insert+0x6a3/0x1b10 [ 22.971517] SyS_epoll_ctl+0x12e4/0x1ab0 [ 22.971520] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.971520] [ 22.971522] Freed by task 3143: [ 22.971524] save_stack+0x43/0xd0 [ 22.971527] kasan_slab_free+0x71/0xc0 [ 22.971529] kfree+0xd6/0x260 [ 22.971532] binder_thread_dec_tmpref+0x27f/0x310 [ 22.971535] binder_thread_release+0x27d/0x540 [ 22.971538] binder_ioctl+0xc02/0x1417 [ 22.971541] do_vfs_ioctl+0x1b1/0x1520 [ 22.971544] SyS_ioctl+0x8f/0xc0 [ 22.971547] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.971548] [ 22.971550] The buggy address belongs to the object at ffff8801ca5207c0 [ 22.971550] which belongs to the cache kmalloc-512 of size 512 [ 22.971554] The buggy address is located 176 bytes inside of [ 22.971554] 512-byte region [ffff8801ca5207c0, ffff8801ca5209c0) [ 22.971555] The buggy address belongs to the page: [ 22.971558] page:00000000a96898df count:1 mapcount:0 mapping:000000007ef6dae2 index:0x0 [ 22.971561] flags: 0x2fffc0000000100(slab) [ 22.971571] raw: 02fffc0000000100 ffff8801ca520040 0000000000000000 0000000100000006 [ 22.971575] raw: ffffea00072946e0 ffffea00072941a0 ffff8801db000940 0000000000000000 [ 22.971577] page dumped because: kasan: bad access detected [ 22.971577] [ 22.971578] Memory state around the buggy address: [ 22.971581] ffff8801ca520700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 22.971584] ffff8801ca520780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 22.971586] >ffff8801ca520800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.971588] ^ [ 22.971590] ffff8801ca520880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.971593] ffff8801ca520900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.971594] ================================================================== [ 22.971595] Disabling lock debugging due to kernel taint [ 22.971597] Kernel panic - not syncing: panic_on_warn set ... [ 22.971597] [ 22.971601] CPU: 1 PID: 3143 Comm: syzkaller573437 Tainted: G B 4.15.0-rc4+ #236 [ 22.971603] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.971604] Call Trace: [ 22.971608] dump_stack+0x194/0x257 [ 22.971612] ? arch_local_irq_restore+0x53/0x53 [ 22.971615] ? kasan_end_report+0x32/0x50 [ 22.971619] ? lock_downgrade+0x980/0x980 [ 22.971622] ? vsnprintf+0x1ed/0x1900 [ 22.971626] ? __lock_acquire+0x3cd0/0x3e00 [ 22.971629] panic+0x1e4/0x41c [ 22.971633] ? refcount_error_report+0x214/0x214 [ 22.971637] ? add_taint+0x40/0x50 [ 22.971639] ? add_taint+0x1c/0x50 [ 22.971643] ? __lock_acquire+0x3d4d/0x3e00 [ 22.971646] kasan_end_report+0x50/0x50 [ 22.971650] kasan_report+0x144/0x340 [ 22.971654] __asan_report_load8_noabort+0x14/0x20 [ 22.971657] __lock_acquire+0x3d4d/0x3e00 [ 22.971660] ? __lock_acquire+0x664/0x3e00 [ 22.971664] ? lock_downgrade+0x980/0x980 [ 22.971667] ? lock_downgrade+0x980/0x980 [ 22.971671] ? remove_wait_queue+0x81/0x350 [ 22.971676] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.971679] ? __lock_acquire+0x664/0x3e00 [ 22.971682] ? check_noncircular+0x20/0x20 [ 22.971689] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.971693] ? lock_acquire+0x1d5/0x580 [ 22.971696] ? lock_acquire+0x1d5/0x580 [ 22.971699] ? ep_free+0xf4/0x320 [ 22.971703] ? lock_release+0xa40/0xa40 [ 22.971707] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.971710] ? print_irqtrace_events+0x270/0x270 [ 22.971714] ? rcu_note_context_switch+0x710/0x710 [ 22.971718] ? __might_sleep+0x95/0x190 [ 22.971721] ? ep_free+0xf4/0x320 [ 22.971724] ? __mutex_lock+0x16f/0x1a80 [ 22.971726] ? ep_free+0xf4/0x320 [ 22.971730] ? print_irqtrace_events+0x270/0x270 [ 22.971733] ? ep_free+0xf4/0x320 [ 22.971737] lock_acquire+0x1d5/0x580 [ 22.971740] ? lock_acquire+0x1d5/0x580 [ 22.971744] ? remove_wait_queue+0x81/0x350 [ 22.971747] ? __lock_acquire+0x664/0x3e00 [ 22.971751] ? lock_release+0xa40/0xa40 [ 22.971756] ? lock_acquire+0x1d5/0x580 [ 22.971759] ? lock_acquire+0x1d5/0x580 [ 22.971762] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.971766] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.971770] ? remove_wait_queue+0x81/0x350 [ 22.971773] remove_wait_queue+0x81/0x350 [ 22.971778] ? add_wait_queue+0x290/0x290 [ 22.971781] ? rcutorture_record_progress+0x10/0x10 [ 22.971786] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.971790] ? __kernel_text_address+0xd/0x40 [ 22.971794] ? clear_tfile_check_list+0x370/0x370 [ 22.971798] ? check_noncircular+0x20/0x20 [ 22.971802] ? locks_remove_file+0x3fa/0x5a0 [ 22.971807] ep_free+0x13f/0x320 [ 22.971810] ? ep_remove+0x800/0x800 [ 22.971814] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.971818] ? ep_free+0x320/0x320 [ 22.971821] ep_eventpoll_release+0x44/0x60 [ 22.971824] __fput+0x327/0x7e0 [ 22.971828] ? fput+0x140/0x140 [ 22.971832] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.971836] ____fput+0x15/0x20 [ 22.971840] task_work_run+0x199/0x270 [ 22.971845] ? task_work_cancel+0x210/0x210 [ 22.971848] ? _raw_spin_unlock+0x22/0x30 [ 22.971851] ? switch_task_namespaces+0x87/0xc0 [ 22.971855] do_exit+0x9bb/0x1ad0 [ 22.971860] ? binder_ioctl+0x4a1/0x1417 [ 22.971863] ? mm_update_next_owner+0x930/0x930 [ 22.971868] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.971873] ? avc_ss_reset+0x110/0x110 [ 22.971875] ? mutex_unlock+0xd/0x10 [ 22.971879] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 22.971888] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.971891] ? up_read+0x1a/0x40 [ 22.971895] ? rcu_note_context_switch+0x710/0x710 [ 22.971898] ? __fd_install+0x288/0x740 [ 22.971903] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.971907] ? do_vfs_ioctl+0x486/0x1520 [ 22.971910] ? _cond_resched+0x14/0x30 [ 22.971915] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.971919] ? selinux_capable+0x40/0x40 [ 22.971923] ? __alloc_fd+0x750/0x750 [ 22.971927] do_group_exit+0x149/0x400 [ 22.971931] ? SyS_exit+0x30/0x30 [ 22.971935] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.971939] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.971943] SyS_exit_group+0x1d/0x20 [ 22.971947] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.971949] RIP: 0033:0x4429f8 [ 22.971951] RSP: 002b:00007ffc7741b5e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.971954] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.971956] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.971958] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.971960] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.971962] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.992583] Dumping ftrace buffer: [ 22.992587] (ftrace buffer empty) [ 22.992589] Kernel Offset: disabled [ 24.117056] Rebooting in 86400 seconds..