[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [ 11.975838] sshd (3040) used greatest stack depth: 15488 bytes left [....] 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.329833] audit: type=1400 audit(1514192087.428:6): avc: denied { map } for pid=3140 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-next-kasan-gce-4,10.128.15.207' (ECDSA) to the list of known hosts. executing program [ 22.618000] audit: type=1400 audit(1514192093.716:7): avc: denied { map } for pid=3154 comm="syzkaller608027" path="/root/syzkaller608027924" 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.623451] ================================================================== [ 22.623464] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 22.623469] Read of size 8 at addr ffff8801c8f08878 by task syzkaller608027/3154 [ 22.623471] [ 22.623478] CPU: 0 PID: 3154 Comm: syzkaller608027 Not tainted 4.15.0-rc4-next-20171221+ #78 [ 22.623481] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.623483] Call Trace: [ 22.623491] dump_stack+0x194/0x257 [ 22.623499] ? arch_local_irq_restore+0x53/0x53 [ 22.623507] ? show_regs_print_info+0x18/0x18 [ 22.623512] ? print_irqtrace_events+0x270/0x270 [ 22.623519] ? __lock_acquire+0x664/0x3e00 [ 22.623525] ? __lock_acquire+0x3d4d/0x3e00 [ 22.623534] print_address_description+0x73/0x250 [ 22.623540] ? __lock_acquire+0x3d4d/0x3e00 [ 22.623546] kasan_report+0x25b/0x340 [ 22.623554] __asan_report_load8_noabort+0x14/0x20 [ 22.623560] __lock_acquire+0x3d4d/0x3e00 [ 22.623565] ? __lock_acquire+0x664/0x3e00 [ 22.623571] ? lock_downgrade+0x980/0x980 [ 22.623576] ? lock_downgrade+0x980/0x980 [ 22.623585] ? remove_wait_queue+0x81/0x350 [ 22.623594] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.623600] ? __lock_acquire+0x664/0x3e00 [ 22.623606] ? check_noncircular+0x20/0x20 [ 22.623618] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.623625] ? lock_acquire+0x1d5/0x580 [ 22.623631] ? lock_acquire+0x1d5/0x580 [ 22.623637] ? ep_free+0xf4/0x320 [ 22.623645] ? lock_release+0xa40/0xa40 [ 22.623652] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.623658] ? print_irqtrace_events+0x270/0x270 [ 22.623665] ? rcu_note_context_switch+0x710/0x710 [ 22.623672] ? __might_sleep+0x95/0x190 [ 22.623678] ? ep_free+0xf4/0x320 [ 22.623685] ? __mutex_lock+0x16f/0x1a80 [ 22.623690] ? ep_free+0xf4/0x320 [ 22.623697] ? print_irqtrace_events+0x270/0x270 [ 22.623702] ? ep_free+0xf4/0x320 [ 22.623710] lock_acquire+0x1d5/0x580 [ 22.623715] ? lock_acquire+0x1d5/0x580 [ 22.623721] ? remove_wait_queue+0x81/0x350 [ 22.623727] ? __lock_acquire+0x664/0x3e00 [ 22.623735] ? lock_release+0xa40/0xa40 [ 22.623744] ? lock_acquire+0x1d5/0x580 [ 22.623749] ? lock_acquire+0x1d5/0x580 [ 22.623755] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.623762] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.623768] ? remove_wait_queue+0x81/0x350 [ 22.623775] remove_wait_queue+0x81/0x350 [ 22.623782] ? add_wait_queue+0x290/0x290 [ 22.623788] ? rcutorture_record_progress+0x10/0x10 [ 22.623798] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.623805] ? __kernel_text_address+0xd/0x40 [ 22.623813] ? clear_tfile_check_list+0x370/0x370 [ 22.623821] ? check_noncircular+0x20/0x20 [ 22.623829] ? locks_remove_file+0x3fa/0x5a0 [ 22.623839] ep_free+0x13f/0x320 [ 22.623845] ? ep_remove+0x800/0x800 [ 22.623850] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.623858] ? ep_free+0x320/0x320 [ 22.623864] ep_eventpoll_release+0x44/0x60 [ 22.623870] __fput+0x327/0x7e0 [ 22.623878] ? fput+0x140/0x140 [ 22.623885] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.623893] ____fput+0x15/0x20 [ 22.623899] task_work_run+0x199/0x270 [ 22.623907] ? task_work_cancel+0x210/0x210 [ 22.623913] ? _raw_spin_unlock+0x22/0x30 [ 22.623919] ? switch_task_namespaces+0x87/0xc0 [ 22.623928] do_exit+0x9bb/0x1ad0 [ 22.623936] ? binder_ioctl+0x491/0x1417 [ 22.623943] ? mm_update_next_owner+0x930/0x930 [ 22.623950] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.623959] ? avc_ss_reset+0x110/0x110 [ 22.623966] ? mutex_unlock+0xd/0x10 [ 22.623971] ? SyS_epoll_ctl+0x30a/0x1a80 [ 22.623991] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.623996] ? up_read+0x1a/0x40 [ 22.624006] ? rcu_note_context_switch+0x710/0x710 [ 22.624012] ? __fd_install+0x288/0x740 [ 22.624020] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.624026] ? do_vfs_ioctl+0x486/0x1520 [ 22.624031] ? _cond_resched+0x14/0x30 [ 22.624039] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.624048] ? selinux_capable+0x40/0x40 [ 22.624054] ? __alloc_fd+0x750/0x750 [ 22.624063] do_group_exit+0x149/0x400 [ 22.624070] ? SyS_exit+0x30/0x30 [ 22.624076] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.624090] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.624098] SyS_exit_group+0x1d/0x20 [ 22.624104] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.624108] RIP: 0033:0x4429f8 [ 22.624112] RSP: 002b:00007fff369a0408 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.624118] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.624121] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.624125] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.624128] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.624131] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.624140] [ 22.624142] Allocated by task 3154: [ 22.624149] save_stack+0x43/0xd0 [ 22.624153] kasan_kmalloc+0xad/0xe0 [ 22.624159] kmem_cache_alloc_trace+0x136/0x750 [ 22.624163] binder_get_thread+0x1cf/0x870 [ 22.624168] binder_poll+0x8c/0x390 [ 22.624173] ep_item_poll.isra.10+0xf2/0x320 [ 22.624177] ep_insert+0x6a2/0x1ac0 [ 22.624182] SyS_epoll_ctl+0x12bf/0x1a80 [ 22.624187] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.624188] [ 22.624190] Freed by task 3154: [ 22.624195] save_stack+0x43/0xd0 [ 22.624199] kasan_slab_free+0x71/0xc0 [ 22.624203] kfree+0xd6/0x260 [ 22.624208] binder_thread_dec_tmpref+0x27f/0x310 [ 22.624213] binder_thread_release+0x27d/0x540 [ 22.624217] binder_ioctl+0xc02/0x1417 [ 22.624221] do_vfs_ioctl+0x1b1/0x1520 [ 22.624225] SyS_ioctl+0x8f/0xc0 [ 22.624230] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.624231] [ 22.624235] The buggy address belongs to the object at ffff8801c8f087c0 [ 22.624235] which belongs to the cache kmalloc-512 of size 512 [ 22.624240] The buggy address is located 184 bytes inside of [ 22.624240] 512-byte region [ffff8801c8f087c0, ffff8801c8f089c0) [ 22.624242] The buggy address belongs to the page: [ 22.624247] page:000000004d59771a count:1 mapcount:0 mapping:00000000351b6cf2 index:0x0 [ 22.624252] flags: 0x2fffc0000000100(slab) [ 22.624260] raw: 02fffc0000000100 ffff8801c8f08040 0000000000000000 0000000100000006 [ 22.624267] raw: ffffea00072509e0 ffffea000726dfa0 ffff8801dac00940 0000000000000000 [ 22.624269] page dumped because: kasan: bad access detected [ 22.624270] [ 22.624272] Memory state around the buggy address: [ 22.624277] ffff8801c8f08700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.624281] ffff8801c8f08780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 22.624285] >ffff8801c8f08800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.624287] ^ [ 22.624292] ffff8801c8f08880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.624296] ffff8801c8f08900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.624298] ================================================================== [ 22.624300] Disabling lock debugging due to kernel taint [ 22.624303] Kernel panic - not syncing: panic_on_warn set ... [ 22.624303] [ 22.624309] CPU: 0 PID: 3154 Comm: syzkaller608027 Tainted: G B 4.15.0-rc4-next-20171221+ #78 [ 22.624312] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.624313] Call Trace: [ 22.624319] dump_stack+0x194/0x257 [ 22.624325] ? arch_local_irq_restore+0x53/0x53 [ 22.624331] ? kasan_end_report+0x32/0x50 [ 22.624337] ? lock_downgrade+0x980/0x980 [ 22.624342] ? vsnprintf+0x1ed/0x1900 [ 22.624348] ? __lock_acquire+0x3d30/0x3e00 [ 22.624354] panic+0x1e4/0x41c [ 22.624360] ? refcount_error_report+0x214/0x214 [ 22.624367] ? add_taint+0x40/0x50 [ 22.624372] ? add_taint+0x1c/0x50 [ 22.624379] ? __lock_acquire+0x3d4d/0x3e00 [ 22.624384] kasan_end_report+0x50/0x50 [ 22.624390] kasan_report+0x144/0x340 [ 22.624398] __asan_report_load8_noabort+0x14/0x20 [ 22.624404] __lock_acquire+0x3d4d/0x3e00 [ 22.624409] ? __lock_acquire+0x664/0x3e00 [ 22.624415] ? lock_downgrade+0x980/0x980 [ 22.624420] ? lock_downgrade+0x980/0x980 [ 22.624428] ? remove_wait_queue+0x81/0x350 [ 22.624436] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.624443] ? __lock_acquire+0x664/0x3e00 [ 22.624448] ? check_noncircular+0x20/0x20 [ 22.624460] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.624467] ? lock_acquire+0x1d5/0x580 [ 22.624472] ? lock_acquire+0x1d5/0x580 [ 22.624477] ? ep_free+0xf4/0x320 [ 22.624485] ? lock_release+0xa40/0xa40 [ 22.624491] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.624498] ? print_irqtrace_events+0x270/0x270 [ 22.624504] ? rcu_note_context_switch+0x710/0x710 [ 22.624511] ? __might_sleep+0x95/0x190 [ 22.624517] ? ep_free+0xf4/0x320 [ 22.624523] ? __mutex_lock+0x16f/0x1a80 [ 22.624528] ? ep_free+0xf4/0x320 [ 22.624535] ? print_irqtrace_events+0x270/0x270 [ 22.624539] ? ep_free+0xf4/0x320 [ 22.624547] lock_acquire+0x1d5/0x580 [ 22.624553] ? lock_acquire+0x1d5/0x580 [ 22.624559] ? remove_wait_queue+0x81/0x350 [ 22.624565] ? __lock_acquire+0x664/0x3e00 [ 22.624572] ? lock_release+0xa40/0xa40 [ 22.624581] ? lock_acquire+0x1d5/0x580 [ 22.624585] ? lock_acquire+0x1d5/0x580 [ 22.624591] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.624599] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.624604] ? remove_wait_queue+0x81/0x350 [ 22.624610] remove_wait_queue+0x81/0x350 [ 22.624618] ? add_wait_queue+0x290/0x290 [ 22.624624] ? rcutorture_record_progress+0x10/0x10 [ 22.624633] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.624640] ? __kernel_text_address+0xd/0x40 [ 22.624648] ? clear_tfile_check_list+0x370/0x370 [ 22.624655] ? check_noncircular+0x20/0x20 [ 22.624663] ? locks_remove_file+0x3fa/0x5a0 [ 22.624672] ep_free+0x13f/0x320 [ 22.624678] ? ep_remove+0x800/0x800 [ 22.624683] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.624690] ? ep_free+0x320/0x320 [ 22.624696] ep_eventpoll_release+0x44/0x60 [ 22.624702] __fput+0x327/0x7e0 [ 22.624710] ? fput+0x140/0x140 [ 22.624716] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.624724] ____fput+0x15/0x20 [ 22.624730] task_work_run+0x199/0x270 [ 22.624738] ? task_work_cancel+0x210/0x210 [ 22.624744] ? _raw_spin_unlock+0x22/0x30 [ 22.624749] ? switch_task_namespaces+0x87/0xc0 [ 22.624757] do_exit+0x9bb/0x1ad0 [ 22.624764] ? binder_ioctl+0x491/0x1417 [ 22.624770] ? mm_update_next_owner+0x930/0x930 [ 22.624777] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.624785] ? avc_ss_reset+0x110/0x110 [ 22.624791] ? mutex_unlock+0xd/0x10 [ 22.624797] ? SyS_epoll_ctl+0x30a/0x1a80 [ 22.624815] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.624820] ? up_read+0x1a/0x40 [ 22.624826] ? rcu_note_context_switch+0x710/0x710 [ 22.624831] ? __fd_install+0x288/0x740 [ 22.624839] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.624844] ? do_vfs_ioctl+0x486/0x1520 [ 22.624850] ? _cond_resched+0x14/0x30 [ 22.624857] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.624864] ? selinux_capable+0x40/0x40 [ 22.624870] ? __alloc_fd+0x750/0x750 [ 22.624878] do_group_exit+0x149/0x400 [ 22.624884] ? SyS_exit+0x30/0x30 [ 22.624891] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.624897] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.624905] SyS_exit_group+0x1d/0x20 [ 22.624911] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.624914] RIP: 0033:0x4429f8 [ 22.624918] RSP: 002b:00007fff369a0408 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.624923] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.624926] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.624930] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.624933] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.624936] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.644341] Dumping ftrace buffer: [ 22.644344] (ftrace buffer empty) [ 22.644347] Kernel Offset: disabled [ 23.772022] Rebooting in 86400 seconds..