[?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. [ 11.787713] audit: type=1400 audit(1514200876.706:6): avc: denied { map } for pid=3130 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-next-kasan-gce-7,10.128.15.193' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.006178] audit: type=1400 audit(1514200882.924:7): avc: denied { map } for pid=3144 comm="syzkaller343205" path="/root/syzkaller343205312" 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.012780] ================================================================== [ 18.012797] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 18.012803] Read of size 8 at addr ffff8801cb5ee138 by task syzkaller343205/3144 [ 18.012804] [ 18.012812] CPU: 1 PID: 3144 Comm: syzkaller343205 Not tainted 4.15.0-rc4-next-20171221+ #78 [ 18.012816] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.012818] Call Trace: [ 18.012827] dump_stack+0x194/0x257 [ 18.012834] ? arch_local_irq_restore+0x53/0x53 [ 18.012844] ? show_regs_print_info+0x18/0x18 [ 18.012849] ? print_irqtrace_events+0x270/0x270 [ 18.012855] ? __lock_acquire+0x664/0x3e00 [ 18.012862] ? __lock_acquire+0x3d4d/0x3e00 [ 18.012872] print_address_description+0x73/0x250 [ 18.012878] ? __lock_acquire+0x3d4d/0x3e00 [ 18.012884] kasan_report+0x25b/0x340 [ 18.012892] __asan_report_load8_noabort+0x14/0x20 [ 18.012898] __lock_acquire+0x3d4d/0x3e00 [ 18.012904] ? __lock_acquire+0x664/0x3e00 [ 18.012909] ? lock_downgrade+0x980/0x980 [ 18.012915] ? lock_downgrade+0x980/0x980 [ 18.012924] ? remove_wait_queue+0x81/0x350 [ 18.012933] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.012940] ? __lock_acquire+0x664/0x3e00 [ 18.012945] ? check_noncircular+0x20/0x20 [ 18.012958] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.012965] ? lock_acquire+0x1d5/0x580 [ 18.012970] ? lock_acquire+0x1d5/0x580 [ 18.012978] ? ep_free+0xf4/0x320 [ 18.012986] ? lock_release+0xa40/0xa40 [ 18.012994] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.013000] ? print_irqtrace_events+0x270/0x270 [ 18.013011] ? rcu_note_context_switch+0x710/0x710 [ 18.013024] ? __might_sleep+0x95/0x190 [ 18.013029] ? ep_free+0xf4/0x320 [ 18.013039] ? __mutex_lock+0x16f/0x1a80 [ 18.013044] ? ep_free+0xf4/0x320 [ 18.013051] ? print_irqtrace_events+0x270/0x270 [ 18.013055] ? ep_free+0xf4/0x320 [ 18.013064] lock_acquire+0x1d5/0x580 [ 18.013069] ? lock_acquire+0x1d5/0x580 [ 18.013075] ? remove_wait_queue+0x81/0x350 [ 18.013081] ? __lock_acquire+0x664/0x3e00 [ 18.013089] ? lock_release+0xa40/0xa40 [ 18.013098] ? lock_acquire+0x1d5/0x580 [ 18.013103] ? lock_acquire+0x1d5/0x580 [ 18.013110] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 18.013118] _raw_spin_lock_irqsave+0x96/0xc0 [ 18.013123] ? remove_wait_queue+0x81/0x350 [ 18.013130] remove_wait_queue+0x81/0x350 [ 18.013138] ? add_wait_queue+0x290/0x290 [ 18.013144] ? rcutorture_record_progress+0x10/0x10 [ 18.013154] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 18.013164] ? __kernel_text_address+0xd/0x40 [ 18.013172] ? clear_tfile_check_list+0x370/0x370 [ 18.013180] ? check_noncircular+0x20/0x20 [ 18.013189] ? locks_remove_file+0x3fa/0x5a0 [ 18.013199] ep_free+0x13f/0x320 [ 18.013205] ? ep_remove+0x800/0x800 [ 18.013210] ? fsnotify_first_mark+0x2b0/0x2b0 [ 18.013218] ? ep_free+0x320/0x320 [ 18.013224] ep_eventpoll_release+0x44/0x60 [ 18.013232] __fput+0x327/0x7e0 [ 18.013240] ? fput+0x140/0x140 [ 18.013247] ? _raw_spin_unlock_irq+0x27/0x70 [ 18.013255] ____fput+0x15/0x20 [ 18.013262] task_work_run+0x199/0x270 [ 18.013270] ? task_work_cancel+0x210/0x210 [ 18.013276] ? _raw_spin_unlock+0x22/0x30 [ 18.013282] ? switch_task_namespaces+0x87/0xc0 [ 18.013292] do_exit+0x9bb/0x1ad0 [ 18.013301] ? binder_ioctl+0x491/0x1417 [ 18.013307] ? mm_update_next_owner+0x930/0x930 [ 18.013315] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 18.013325] ? avc_ss_reset+0x110/0x110 [ 18.013331] ? mutex_unlock+0xd/0x10 [ 18.013337] ? SyS_epoll_ctl+0x30a/0x1a80 [ 18.013357] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.013361] ? up_read+0x1a/0x40 [ 18.013368] ? rcu_note_context_switch+0x710/0x710 [ 18.013374] ? __fd_install+0x288/0x740 [ 18.013383] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 18.013389] ? do_vfs_ioctl+0x486/0x1520 [ 18.013394] ? _cond_resched+0x14/0x30 [ 18.013402] ? ioctl_preallocate+0x2b0/0x2b0 [ 18.013409] ? selinux_capable+0x40/0x40 [ 18.013416] ? __alloc_fd+0x750/0x750 [ 18.013424] do_group_exit+0x149/0x400 [ 18.013431] ? SyS_exit+0x30/0x30 [ 18.013438] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 18.013445] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 18.013453] SyS_exit_group+0x1d/0x20 [ 18.013459] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.013464] RIP: 0033:0x4429f8 [ 18.013467] RSP: 002b:00007ffc76e472a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 18.013474] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 18.013477] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 18.013481] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 18.013484] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 18.013488] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 18.013496] [ 18.013499] Allocated by task 3144: [ 18.013505] save_stack+0x43/0xd0 [ 18.013510] kasan_kmalloc+0xad/0xe0 [ 18.013515] kmem_cache_alloc_trace+0x136/0x750 [ 18.013520] binder_get_thread+0x1cf/0x870 [ 18.013524] binder_poll+0x8c/0x390 [ 18.013529] ep_item_poll.isra.10+0xf2/0x320 [ 18.013533] ep_insert+0x6a2/0x1ac0 [ 18.013538] SyS_epoll_ctl+0x12bf/0x1a80 [ 18.013543] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.013544] [ 18.013547] Freed by task 3144: [ 18.013551] save_stack+0x43/0xd0 [ 18.013556] kasan_slab_free+0x71/0xc0 [ 18.013560] kfree+0xd6/0x260 [ 18.013565] binder_thread_dec_tmpref+0x27f/0x310 [ 18.013570] binder_thread_release+0x27d/0x540 [ 18.013574] binder_ioctl+0xc02/0x1417 [ 18.013578] do_vfs_ioctl+0x1b1/0x1520 [ 18.013582] SyS_ioctl+0x8f/0xc0 [ 18.013587] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.013588] [ 18.013593] The buggy address belongs to the object at ffff8801cb5ee080 [ 18.013593] which belongs to the cache kmalloc-512 of size 512 [ 18.013598] The buggy address is located 184 bytes inside of [ 18.013598] 512-byte region [ffff8801cb5ee080, ffff8801cb5ee280) [ 18.013599] The buggy address belongs to the page: [ 18.013605] page:000000002e2c4081 count:1 mapcount:0 mapping:00000000694cd0bc index:0x0 [ 18.013611] flags: 0x2fffc0000000100(slab) [ 18.013620] raw: 02fffc0000000100 ffff8801cb5ee080 0000000000000000 0000000100000006 [ 18.013627] raw: ffffea000726a6a0 ffffea0007275760 ffff8801dac00940 0000000000000000 [ 18.013629] page dumped because: kasan: bad access detected [ 18.013630] [ 18.013632] Memory state around the buggy address: [ 18.013637] ffff8801cb5ee000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.013642] ffff8801cb5ee080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.013646] >ffff8801cb5ee100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.013648] ^ [ 18.013652] ffff8801cb5ee180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.013657] ffff8801cb5ee200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.013659] ================================================================== [ 18.013661] Disabling lock debugging due to kernel taint [ 18.013664] Kernel panic - not syncing: panic_on_warn set ... [ 18.013664] [ 18.013670] CPU: 1 PID: 3144 Comm: syzkaller343205 Tainted: G B 4.15.0-rc4-next-20171221+ #78 [ 18.013674] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.013675] Call Trace: [ 18.013681] dump_stack+0x194/0x257 [ 18.013687] ? arch_local_irq_restore+0x53/0x53 [ 18.013693] ? kasan_end_report+0x32/0x50 [ 18.013700] ? lock_downgrade+0x980/0x980 [ 18.013705] ? vsnprintf+0x1ed/0x1900 [ 18.013711] ? __lock_acquire+0x3d30/0x3e00 [ 18.013717] panic+0x1e4/0x41c [ 18.013723] ? refcount_error_report+0x214/0x214 [ 18.013730] ? add_taint+0x40/0x50 [ 18.013736] ? add_taint+0x1c/0x50 [ 18.013742] ? __lock_acquire+0x3d4d/0x3e00 [ 18.013748] kasan_end_report+0x50/0x50 [ 18.013754] kasan_report+0x144/0x340 [ 18.013762] __asan_report_load8_noabort+0x14/0x20 [ 18.013768] __lock_acquire+0x3d4d/0x3e00 [ 18.013774] ? __lock_acquire+0x664/0x3e00 [ 18.013779] ? lock_downgrade+0x980/0x980 [ 18.013785] ? lock_downgrade+0x980/0x980 [ 18.013792] ? remove_wait_queue+0x81/0x350 [ 18.013801] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.013807] ? __lock_acquire+0x664/0x3e00 [ 18.013812] ? check_noncircular+0x20/0x20 [ 18.013824] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.013831] ? lock_acquire+0x1d5/0x580 [ 18.013837] ? lock_acquire+0x1d5/0x580 [ 18.013842] ? ep_free+0xf4/0x320 [ 18.013850] ? lock_release+0xa40/0xa40 [ 18.013856] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.013863] ? print_irqtrace_events+0x270/0x270 [ 18.013869] ? rcu_note_context_switch+0x710/0x710 [ 18.013876] ? __might_sleep+0x95/0x190 [ 18.013882] ? ep_free+0xf4/0x320 [ 18.013888] ? __mutex_lock+0x16f/0x1a80 [ 18.013893] ? ep_free+0xf4/0x320 [ 18.013900] ? print_irqtrace_events+0x270/0x270 [ 18.013905] ? ep_free+0xf4/0x320 [ 18.013913] lock_acquire+0x1d5/0x580 [ 18.013918] ? lock_acquire+0x1d5/0x580 [ 18.013924] ? remove_wait_queue+0x81/0x350 [ 18.013930] ? __lock_acquire+0x664/0x3e00 [ 18.013937] ? lock_release+0xa40/0xa40 [ 18.013946] ? lock_acquire+0x1d5/0x580 [ 18.013951] ? lock_acquire+0x1d5/0x580 [ 18.013958] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 18.013965] _raw_spin_lock_irqsave+0x96/0xc0 [ 18.013970] ? remove_wait_queue+0x81/0x350 [ 18.013976] remove_wait_queue+0x81/0x350 [ 18.013984] ? add_wait_queue+0x290/0x290 [ 18.013990] ? rcutorture_record_progress+0x10/0x10 [ 18.014000] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 18.014007] ? __kernel_text_address+0xd/0x40 [ 18.014018] ? clear_tfile_check_list+0x370/0x370 [ 18.014026] ? check_noncircular+0x20/0x20 [ 18.014033] ? locks_remove_file+0x3fa/0x5a0 [ 18.014042] ep_free+0x13f/0x320 [ 18.014048] ? ep_remove+0x800/0x800 [ 18.014054] ? fsnotify_first_mark+0x2b0/0x2b0 [ 18.014061] ? ep_free+0x320/0x320 [ 18.014067] ep_eventpoll_release+0x44/0x60 [ 18.014073] __fput+0x327/0x7e0 [ 18.014081] ? fput+0x140/0x140 [ 18.014087] ? _raw_spin_unlock_irq+0x27/0x70 [ 18.014095] ____fput+0x15/0x20 [ 18.014102] task_work_run+0x199/0x270 [ 18.014109] ? task_work_cancel+0x210/0x210 [ 18.014115] ? _raw_spin_unlock+0x22/0x30 [ 18.014121] ? switch_task_namespaces+0x87/0xc0 [ 18.014128] do_exit+0x9bb/0x1ad0 [ 18.014135] ? binder_ioctl+0x491/0x1417 [ 18.014141] ? mm_update_next_owner+0x930/0x930 [ 18.014149] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 18.014157] ? avc_ss_reset+0x110/0x110 [ 18.014163] ? mutex_unlock+0xd/0x10 [ 18.014168] ? SyS_epoll_ctl+0x30a/0x1a80 [ 18.014186] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.014191] ? up_read+0x1a/0x40 [ 18.014198] ? rcu_note_context_switch+0x710/0x710 [ 18.014203] ? __fd_install+0x288/0x740 [ 18.014211] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 18.014216] ? do_vfs_ioctl+0x486/0x1520 [ 18.014222] ? _cond_resched+0x14/0x30 [ 18.014229] ? ioctl_preallocate+0x2b0/0x2b0 [ 18.014236] ? selinux_capable+0x40/0x40 [ 18.014242] ? __alloc_fd+0x750/0x750 [ 18.014250] do_group_exit+0x149/0x400 [ 18.014257] ? SyS_exit+0x30/0x30 [ 18.014264] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 18.014270] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 18.014278] SyS_exit_group+0x1d/0x20 [ 18.014284] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.014287] RIP: 0033:0x4429f8 [ 18.014290] RSP: 002b:00007ffc76e472a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 18.014296] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 18.014299] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 18.014303] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 18.014306] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 18.014309] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 18.033119] Dumping ftrace buffer: [ 18.033124] (ftrace buffer empty) [ 18.033127] Kernel Offset: disabled [ 19.164074] Rebooting in 86400 seconds..