[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [ 11.883238] audit: type=1400 audit(1513741447.694:6): avc: denied { map } for pid=3123 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 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added 'ci-upstream-kasan-gce-9,10.128.0.9' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.259590] audit: type=1400 audit(1513741454.070:7): avc: denied { map } for pid=3137 comm="syzkaller313843" path="/root/syzkaller313843371" 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 [ 18.265300] ================================================================== [ 18.265316] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 18.265321] Read of size 8 at addr ffff8801ca3fb670 by task syzkaller313843/3137 [ 18.265322] [ 18.265329] CPU: 1 PID: 3137 Comm: syzkaller313843 Not tainted 4.15.0-rc4+ #229 [ 18.265333] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.265334] Call Trace: [ 18.265344] dump_stack+0x194/0x257 [ 18.265352] ? arch_local_irq_restore+0x53/0x53 [ 18.265360] ? show_regs_print_info+0x18/0x18 [ 18.265365] ? print_irqtrace_events+0x270/0x270 [ 18.265371] ? __lock_acquire+0x664/0x3e00 [ 18.265378] ? __lock_acquire+0x3d4d/0x3e00 [ 18.265386] print_address_description+0x73/0x250 [ 18.265392] ? __lock_acquire+0x3d4d/0x3e00 [ 18.265397] kasan_report+0x25b/0x340 [ 18.265405] __asan_report_load8_noabort+0x14/0x20 [ 18.265410] __lock_acquire+0x3d4d/0x3e00 [ 18.265416] ? __lock_acquire+0x664/0x3e00 [ 18.265421] ? lock_downgrade+0x980/0x980 [ 18.265426] ? lock_downgrade+0x980/0x980 [ 18.265435] ? remove_wait_queue+0x81/0x350 [ 18.265444] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.265450] ? __lock_acquire+0x664/0x3e00 [ 18.265456] ? check_noncircular+0x20/0x20 [ 18.265468] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.265475] ? lock_acquire+0x1d5/0x580 [ 18.265480] ? lock_acquire+0x1d5/0x580 [ 18.265486] ? ep_free+0xf4/0x320 [ 18.265494] ? lock_release+0xa40/0xa40 [ 18.265501] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.265507] ? print_irqtrace_events+0x270/0x270 [ 18.265513] ? rcu_note_context_switch+0x710/0x710 [ 18.265520] ? __might_sleep+0x95/0x190 [ 18.265525] ? ep_free+0xf4/0x320 [ 18.265532] ? __mutex_lock+0x16f/0x1a80 [ 18.265536] ? ep_free+0xf4/0x320 [ 18.265543] ? print_irqtrace_events+0x270/0x270 [ 18.265547] ? ep_free+0xf4/0x320 [ 18.265555] lock_acquire+0x1d5/0x580 [ 18.265560] ? lock_acquire+0x1d5/0x580 [ 18.265566] ? remove_wait_queue+0x81/0x350 [ 18.265572] ? __lock_acquire+0x664/0x3e00 [ 18.265579] ? lock_release+0xa40/0xa40 [ 18.265588] ? lock_acquire+0x1d5/0x580 [ 18.265593] ? lock_acquire+0x1d5/0x580 [ 18.265600] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 18.265607] _raw_spin_lock_irqsave+0x96/0xc0 [ 18.265612] ? remove_wait_queue+0x81/0x350 [ 18.265618] remove_wait_queue+0x81/0x350 [ 18.265626] ? add_wait_queue+0x290/0x290 [ 18.265632] ? rcutorture_record_progress+0x10/0x10 [ 18.265642] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 18.265649] ? __kernel_text_address+0xd/0x40 [ 18.265658] ? clear_tfile_check_list+0x370/0x370 [ 18.265666] ? check_noncircular+0x20/0x20 [ 18.265673] ? locks_remove_file+0x3fa/0x5a0 [ 18.265682] ep_free+0x13f/0x320 [ 18.265687] ? ep_remove+0x800/0x800 [ 18.265693] ? fsnotify_first_mark+0x2b0/0x2b0 [ 18.265700] ? ep_free+0x320/0x320 [ 18.265706] ep_eventpoll_release+0x44/0x60 [ 18.265711] __fput+0x327/0x7e0 [ 18.265719] ? fput+0x140/0x140 [ 18.265725] ? _raw_spin_unlock_irq+0x27/0x70 [ 18.265733] ____fput+0x15/0x20 [ 18.265739] task_work_run+0x199/0x270 [ 18.265747] ? task_work_cancel+0x210/0x210 [ 18.265753] ? _raw_spin_unlock+0x22/0x30 [ 18.265758] ? switch_task_namespaces+0x87/0xc0 [ 18.265766] do_exit+0x9bb/0x1ad0 [ 18.265775] ? binder_ioctl+0x4e1/0x1417 [ 18.265781] ? mm_update_next_owner+0x930/0x930 [ 18.265789] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 18.265798] ? avc_ss_reset+0x110/0x110 [ 18.265804] ? mutex_unlock+0xd/0x10 [ 18.265809] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 18.265828] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.265833] ? up_read+0x1a/0x40 [ 18.265840] ? rcu_note_context_switch+0x710/0x710 [ 18.265845] ? __fd_install+0x288/0x740 [ 18.265854] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 18.265860] ? do_vfs_ioctl+0x486/0x1520 [ 18.265865] ? _cond_resched+0x14/0x30 [ 18.265873] ? ioctl_preallocate+0x2b0/0x2b0 [ 18.265880] ? selinux_capable+0x40/0x40 [ 18.265887] ? __alloc_fd+0x750/0x750 [ 18.265895] do_group_exit+0x149/0x400 [ 18.265902] ? SyS_exit+0x30/0x30 [ 18.265908] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 18.265916] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 18.265924] SyS_exit_group+0x1d/0x20 [ 18.265930] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.265934] RIP: 0033:0x442a08 [ 18.265938] RSP: 002b:00007ffdb6561fc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 18.265944] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000442a08 [ 18.265947] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 18.265951] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 18.265954] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a50 [ 18.265957] R13: 0000000000401ae0 R14: 0000000000000000 R15: 0000000000000000 [ 18.265965] [ 18.265968] Allocated by task 3137: [ 18.265973] save_stack+0x43/0xd0 [ 18.265977] kasan_kmalloc+0xad/0xe0 [ 18.265983] kmem_cache_alloc_trace+0x136/0x750 [ 18.265988] binder_get_thread+0x1cf/0x870 [ 18.265992] binder_poll+0x8c/0x390 [ 18.265996] ep_item_poll.isra.10+0xec/0x320 [ 18.266000] ep_insert+0x6a3/0x1b10 [ 18.266008] SyS_epoll_ctl+0x12e4/0x1ab0 [ 18.266013] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.266014] [ 18.266016] Freed by task 3137: [ 18.266020] save_stack+0x43/0xd0 [ 18.266024] kasan_slab_free+0x71/0xc0 [ 18.266029] kfree+0xca/0x250 [ 18.266034] binder_thread_dec_tmpref+0x27f/0x310 [ 18.266038] binder_thread_release+0x27d/0x540 [ 18.266042] binder_ioctl+0xc02/0x1417 [ 18.266047] do_vfs_ioctl+0x1b1/0x1520 [ 18.266052] SyS_ioctl+0x8f/0xc0 [ 18.266057] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.266058] [ 18.266062] The buggy address belongs to the object at ffff8801ca3fb5c0 [ 18.266062] which belongs to the cache kmalloc-512 of size 512 [ 18.266067] The buggy address is located 176 bytes inside of [ 18.266067] 512-byte region [ffff8801ca3fb5c0, ffff8801ca3fb7c0) [ 18.266068] The buggy address belongs to the page: [ 18.266076] page:00000000587160d0 count:1 mapcount:0 mapping:0000000050d471bc index:0x0 [ 18.266081] flags: 0x2fffc0000000100(slab) [ 18.266090] raw: 02fffc0000000100 ffff8801ca3fb0c0 0000000000000000 0000000100000006 [ 18.266097] raw: ffffea0007279ee0 ffffea0007279e20 ffff8801db000940 0000000000000000 [ 18.266099] page dumped because: kasan: bad access detected [ 18.266100] [ 18.266102] Memory state around the buggy address: [ 18.266106] ffff8801ca3fb500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 18.266111] ffff8801ca3fb580: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 18.266115] >ffff8801ca3fb600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.266117] ^ [ 18.266122] ffff8801ca3fb680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.266126] ffff8801ca3fb700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.266127] ================================================================== [ 18.266129] Disabling lock debugging due to kernel taint [ 18.266132] Kernel panic - not syncing: panic_on_warn set ... [ 18.266132] [ 18.266138] CPU: 1 PID: 3137 Comm: syzkaller313843 Tainted: G B 4.15.0-rc4+ #229 [ 18.266140] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.266142] Call Trace: [ 18.266149] dump_stack+0x194/0x257 [ 18.266156] ? arch_local_irq_restore+0x53/0x53 [ 18.266161] ? kasan_end_report+0x32/0x50 [ 18.266167] ? lock_downgrade+0x980/0x980 [ 18.266172] ? vsnprintf+0x1ed/0x1900 [ 18.266179] ? __lock_acquire+0x3c90/0x3e00 [ 18.266184] panic+0x1e4/0x41c [ 18.266190] ? refcount_error_report+0x214/0x214 [ 18.266197] ? add_taint+0x40/0x50 [ 18.266202] ? add_taint+0x1c/0x50 [ 18.266208] ? __lock_acquire+0x3d4d/0x3e00 [ 18.266213] kasan_end_report+0x50/0x50 [ 18.266219] kasan_report+0x144/0x340 [ 18.266226] __asan_report_load8_noabort+0x14/0x20 [ 18.266231] __lock_acquire+0x3d4d/0x3e00 [ 18.266237] ? __lock_acquire+0x664/0x3e00 [ 18.266242] ? lock_downgrade+0x980/0x980 [ 18.266247] ? lock_downgrade+0x980/0x980 [ 18.266254] ? remove_wait_queue+0x81/0x350 [ 18.266263] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.266269] ? __lock_acquire+0x664/0x3e00 [ 18.266274] ? check_noncircular+0x20/0x20 [ 18.266286] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.266292] ? lock_acquire+0x1d5/0x580 [ 18.266298] ? lock_acquire+0x1d5/0x580 [ 18.266302] ? ep_free+0xf4/0x320 [ 18.266310] ? lock_release+0xa40/0xa40 [ 18.266316] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.266322] ? print_irqtrace_events+0x270/0x270 [ 18.266328] ? rcu_note_context_switch+0x710/0x710 [ 18.266335] ? __might_sleep+0x95/0x190 [ 18.266340] ? ep_free+0xf4/0x320 [ 18.266346] ? __mutex_lock+0x16f/0x1a80 [ 18.266350] ? ep_free+0xf4/0x320 [ 18.266357] ? print_irqtrace_events+0x270/0x270 [ 18.266361] ? ep_free+0xf4/0x320 [ 18.266369] lock_acquire+0x1d5/0x580 [ 18.266374] ? lock_acquire+0x1d5/0x580 [ 18.266379] ? remove_wait_queue+0x81/0x350 [ 18.266385] ? __lock_acquire+0x664/0x3e00 [ 18.266392] ? lock_release+0xa40/0xa40 [ 18.266401] ? lock_acquire+0x1d5/0x580 [ 18.266406] ? lock_acquire+0x1d5/0x580 [ 18.266413] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 18.266420] _raw_spin_lock_irqsave+0x96/0xc0 [ 18.266425] ? remove_wait_queue+0x81/0x350 [ 18.266431] remove_wait_queue+0x81/0x350 [ 18.266439] ? add_wait_queue+0x290/0x290 [ 18.266444] ? rcutorture_record_progress+0x10/0x10 [ 18.266454] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 18.266461] ? __kernel_text_address+0xd/0x40 [ 18.266469] ? clear_tfile_check_list+0x370/0x370 [ 18.266476] ? check_noncircular+0x20/0x20 [ 18.266483] ? locks_remove_file+0x3fa/0x5a0 [ 18.266491] ep_free+0x13f/0x320 [ 18.266497] ? ep_remove+0x800/0x800 [ 18.266503] ? fsnotify_first_mark+0x2b0/0x2b0 [ 18.266510] ? ep_free+0x320/0x320 [ 18.266515] ep_eventpoll_release+0x44/0x60 [ 18.266520] __fput+0x327/0x7e0 [ 18.266528] ? fput+0x140/0x140 [ 18.266534] ? _raw_spin_unlock_irq+0x27/0x70 [ 18.266541] ____fput+0x15/0x20 [ 18.266547] task_work_run+0x199/0x270 [ 18.266554] ? task_work_cancel+0x210/0x210 [ 18.266560] ? _raw_spin_unlock+0x22/0x30 [ 18.266566] ? switch_task_namespaces+0x87/0xc0 [ 18.266573] do_exit+0x9bb/0x1ad0 [ 18.266580] ? binder_ioctl+0x4e1/0x1417 [ 18.266586] ? mm_update_next_owner+0x930/0x930 [ 18.266593] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 18.266602] ? avc_ss_reset+0x110/0x110 [ 18.266607] ? mutex_unlock+0xd/0x10 [ 18.266612] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 18.266630] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.266635] ? up_read+0x1a/0x40 [ 18.266641] ? rcu_note_context_switch+0x710/0x710 [ 18.266646] ? __fd_install+0x288/0x740 [ 18.266655] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 18.266661] ? do_vfs_ioctl+0x486/0x1520 [ 18.266666] ? _cond_resched+0x14/0x30 [ 18.266674] ? ioctl_preallocate+0x2b0/0x2b0 [ 18.266680] ? selinux_capable+0x40/0x40 [ 18.266687] ? __alloc_fd+0x750/0x750 [ 18.266695] do_group_exit+0x149/0x400 [ 18.266701] ? SyS_exit+0x30/0x30 [ 18.266708] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 18.266714] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 18.266721] SyS_exit_group+0x1d/0x20 [ 18.266727] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.266731] RIP: 0033:0x442a08 [ 18.266734] RSP: 002b:00007ffdb6561fc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 18.266739] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000442a08 [ 18.266743] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 18.266746] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 18.266749] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a50 [ 18.266752] R13: 0000000000401ae0 R14: 0000000000000000 R15: 0000000000000000 [ 18.286175] Dumping ftrace buffer: [ 18.286178] (ftrace buffer empty) [ 18.286181] Kernel Offset: disabled [ 19.414349] Rebooting in 86400 seconds..