[?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. [ 12.996516] audit: type=1400 audit(1514319234.945:6): avc: denied { map } for pid=3135 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-0,10.128.0.82' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 37.014401] audit: type=1400 audit(1514319258.963:7): avc: denied { map } for pid=3154 comm="syzkaller288978" path="/root/syzkaller288978418" 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 [ 37.017792] ================================================================== [ 37.017804] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 37.017808] Read of size 8 at addr ffff8801cebc43b0 by task syzkaller288978/3154 [ 37.017809] [ 37.017814] CPU: 1 PID: 3154 Comm: syzkaller288978 Not tainted 4.15.0-rc5+ #237 [ 37.017816] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.017818] Call Trace: [ 37.017825] dump_stack+0x194/0x257 [ 37.017830] ? arch_local_irq_restore+0x53/0x53 [ 37.017836] ? show_regs_print_info+0x18/0x18 [ 37.017839] ? print_irqtrace_events+0x270/0x270 [ 37.017843] ? __lock_acquire+0x664/0x3e00 [ 37.017847] ? __lock_acquire+0x3d4d/0x3e00 [ 37.017853] print_address_description+0x73/0x250 [ 37.017856] ? __lock_acquire+0x3d4d/0x3e00 [ 37.017860] kasan_report+0x25b/0x340 [ 37.017865] __asan_report_load8_noabort+0x14/0x20 [ 37.017868] __lock_acquire+0x3d4d/0x3e00 [ 37.017871] ? __lock_acquire+0x664/0x3e00 [ 37.017874] ? lock_downgrade+0x980/0x980 [ 37.017877] ? lock_downgrade+0x980/0x980 [ 37.017883] ? remove_wait_queue+0x81/0x350 [ 37.017888] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 37.017892] ? __lock_acquire+0x664/0x3e00 [ 37.017895] ? check_noncircular+0x20/0x20 [ 37.017903] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 37.017907] ? lock_acquire+0x1d5/0x580 [ 37.017910] ? lock_acquire+0x1d5/0x580 [ 37.017915] ? ep_free+0xf4/0x320 [ 37.017920] ? lock_release+0xa40/0xa40 [ 37.017924] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 37.017928] ? print_irqtrace_events+0x270/0x270 [ 37.017934] ? rcu_note_context_switch+0x710/0x710 [ 37.017938] ? __might_sleep+0x95/0x190 [ 37.017941] ? ep_free+0xf4/0x320 [ 37.017945] ? __mutex_lock+0x16f/0x1a80 [ 37.017948] ? ep_free+0xf4/0x320 [ 37.017952] ? print_irqtrace_events+0x270/0x270 [ 37.017954] ? ep_free+0xf4/0x320 [ 37.017959] lock_acquire+0x1d5/0x580 [ 37.017962] ? lock_acquire+0x1d5/0x580 [ 37.017966] ? remove_wait_queue+0x81/0x350 [ 37.017969] ? __lock_acquire+0x664/0x3e00 [ 37.017974] ? lock_release+0xa40/0xa40 [ 37.017979] ? lock_acquire+0x1d5/0x580 [ 37.017982] ? lock_acquire+0x1d5/0x580 [ 37.017985] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 37.017990] _raw_spin_lock_irqsave+0x96/0xc0 [ 37.017994] ? remove_wait_queue+0x81/0x350 [ 37.017998] remove_wait_queue+0x81/0x350 [ 37.018006] ? add_wait_queue+0x290/0x290 [ 37.018010] ? rcutorture_record_progress+0x10/0x10 [ 37.018016] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 37.018021] ? __kernel_text_address+0xd/0x40 [ 37.018030] ? clear_tfile_check_list+0x370/0x370 [ 37.018034] ? check_noncircular+0x20/0x20 [ 37.018040] ? locks_remove_file+0x3fa/0x5a0 [ 37.018045] ep_free+0x13f/0x320 [ 37.018049] ? ep_remove+0x800/0x800 [ 37.018054] ? fsnotify_first_mark+0x2b0/0x2b0 [ 37.018058] ? ep_free+0x320/0x320 [ 37.018062] ep_eventpoll_release+0x44/0x60 [ 37.018066] __fput+0x327/0x7e0 [ 37.018071] ? fput+0x140/0x140 [ 37.018075] ? _raw_spin_unlock_irq+0x27/0x70 [ 37.018079] ____fput+0x15/0x20 [ 37.018083] task_work_run+0x199/0x270 [ 37.018088] ? task_work_cancel+0x210/0x210 [ 37.018092] ? _raw_spin_unlock+0x22/0x30 [ 37.018096] ? switch_task_namespaces+0x87/0xc0 [ 37.018102] do_exit+0x9bb/0x1ad0 [ 37.018110] ? binder_ioctl+0x4a1/0x1417 [ 37.018114] ? mm_update_next_owner+0x930/0x930 [ 37.018119] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 37.018127] ? avc_ss_reset+0x110/0x110 [ 37.018130] ? mutex_unlock+0xd/0x10 [ 37.018133] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 37.018137] ? find_held_lock+0x35/0x1d0 [ 37.018143] ? lock_downgrade+0x980/0x980 [ 37.018151] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 37.018155] ? rcu_note_context_switch+0x710/0x710 [ 37.018160] ? __fd_install+0x288/0x740 [ 37.018165] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 37.018170] ? do_vfs_ioctl+0x486/0x1520 [ 37.018174] ? _cond_resched+0x14/0x30 [ 37.018179] ? ioctl_preallocate+0x2b0/0x2b0 [ 37.018184] ? selinux_capable+0x40/0x40 [ 37.018188] ? __alloc_fd+0x750/0x750 [ 37.018193] do_group_exit+0x149/0x400 [ 37.018197] ? SyS_exit+0x30/0x30 [ 37.018201] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 37.018207] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 37.018211] SyS_exit_group+0x1d/0x20 [ 37.018215] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 37.018218] RIP: 0033:0x4429f8 [ 37.018221] RSP: 002b:00007fff554ddc88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 37.018225] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004429f8 [ 37.018227] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 37.018229] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 37.018231] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 37.018233] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 37.018238] [ 37.018240] Allocated by task 3154: [ 37.018244] save_stack+0x43/0xd0 [ 37.018246] kasan_kmalloc+0xad/0xe0 [ 37.018251] kmem_cache_alloc_trace+0x136/0x750 [ 37.018255] binder_get_thread+0x1cf/0x870 [ 37.018258] binder_poll+0x8c/0x390 [ 37.018260] ep_item_poll.isra.10+0xec/0x320 [ 37.018263] ep_insert+0x6a3/0x1b10 [ 37.018265] SyS_epoll_ctl+0x12e4/0x1ab0 [ 37.018269] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 37.018269] [ 37.018271] Freed by task 3154: [ 37.018273] save_stack+0x43/0xd0 [ 37.018276] kasan_slab_free+0x71/0xc0 [ 37.018278] kfree+0xd6/0x260 [ 37.018281] binder_thread_dec_tmpref+0x27f/0x310 [ 37.018284] binder_thread_release+0x27d/0x540 [ 37.018287] binder_ioctl+0xc02/0x1417 [ 37.018290] do_vfs_ioctl+0x1b1/0x1520 [ 37.018293] SyS_ioctl+0x8f/0xc0 [ 37.018296] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 37.018297] [ 37.018299] The buggy address belongs to the object at ffff8801cebc4300 [ 37.018299] which belongs to the cache kmalloc-512 of size 512 [ 37.018302] The buggy address is located 176 bytes inside of [ 37.018302] 512-byte region [ffff8801cebc4300, ffff8801cebc4500) [ 37.018303] The buggy address belongs to the page: [ 37.018307] page:00000000ccee704d count:1 mapcount:0 mapping:000000009171fcfb index:0x0 [ 37.018310] flags: 0x2fffc0000000100(slab) [ 37.018316] raw: 02fffc0000000100 ffff8801cebc4080 0000000000000000 0000000100000006 [ 37.018319] raw: ffffea00073af0a0 ffffea00073af1e0 ffff8801db000940 0000000000000000 [ 37.018321] page dumped because: kasan: bad access detected [ 37.018321] [ 37.018322] Memory state around the buggy address: [ 37.018325] ffff8801cebc4280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.018328] ffff8801cebc4300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.018330] >ffff8801cebc4380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.018332] ^ [ 37.018334] ffff8801cebc4400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.018336] ffff8801cebc4480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.018338] ================================================================== [ 37.018339] Disabling lock debugging due to kernel taint [ 37.018341] Kernel panic - not syncing: panic_on_warn set ... [ 37.018341] [ 37.018344] CPU: 1 PID: 3154 Comm: syzkaller288978 Tainted: G B 4.15.0-rc5+ #237 [ 37.018346] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.018347] Call Trace: [ 37.018351] dump_stack+0x194/0x257 [ 37.018355] ? arch_local_irq_restore+0x53/0x53 [ 37.018358] ? kasan_end_report+0x32/0x50 [ 37.018362] ? lock_downgrade+0x980/0x980 [ 37.018365] ? vsnprintf+0x1ed/0x1900 [ 37.018369] ? __lock_acquire+0x3cd0/0x3e00 [ 37.018372] panic+0x1e4/0x41c [ 37.018375] ? refcount_error_report+0x214/0x214 [ 37.018379] ? add_taint+0x40/0x50 [ 37.018382] ? add_taint+0x1c/0x50 [ 37.018386] ? __lock_acquire+0x3d4d/0x3e00 [ 37.018389] kasan_end_report+0x50/0x50 [ 37.018392] kasan_report+0x144/0x340 [ 37.018397] __asan_report_load8_noabort+0x14/0x20 [ 37.018400] __lock_acquire+0x3d4d/0x3e00 [ 37.018403] ? __lock_acquire+0x664/0x3e00 [ 37.018406] ? lock_downgrade+0x980/0x980 [ 37.018409] ? lock_downgrade+0x980/0x980 [ 37.018414] ? remove_wait_queue+0x81/0x350 [ 37.018419] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 37.018422] ? __lock_acquire+0x664/0x3e00 [ 37.018425] ? check_noncircular+0x20/0x20 [ 37.018432] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 37.018436] ? lock_acquire+0x1d5/0x580 [ 37.018439] ? lock_acquire+0x1d5/0x580 [ 37.018441] ? ep_free+0xf4/0x320 [ 37.018446] ? lock_release+0xa40/0xa40 [ 37.018450] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 37.018453] ? print_irqtrace_events+0x270/0x270 [ 37.018457] ? rcu_note_context_switch+0x710/0x710 [ 37.018461] ? __might_sleep+0x95/0x190 [ 37.018464] ? ep_free+0xf4/0x320 [ 37.018467] ? __mutex_lock+0x16f/0x1a80 [ 37.018469] ? ep_free+0xf4/0x320 [ 37.018473] ? print_irqtrace_events+0x270/0x270 [ 37.018476] ? ep_free+0xf4/0x320 [ 37.018480] lock_acquire+0x1d5/0x580 [ 37.018483] ? lock_acquire+0x1d5/0x580 [ 37.018486] ? remove_wait_queue+0x81/0x350 [ 37.018490] ? __lock_acquire+0x664/0x3e00 [ 37.018494] ? lock_release+0xa40/0xa40 [ 37.018499] ? lock_acquire+0x1d5/0x580 [ 37.018502] ? lock_acquire+0x1d5/0x580 [ 37.018505] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 37.018509] _raw_spin_lock_irqsave+0x96/0xc0 [ 37.018513] ? remove_wait_queue+0x81/0x350 [ 37.018516] remove_wait_queue+0x81/0x350 [ 37.018520] ? add_wait_queue+0x290/0x290 [ 37.018524] ? rcutorture_record_progress+0x10/0x10 [ 37.018529] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 37.018533] ? __kernel_text_address+0xd/0x40 [ 37.018537] ? clear_tfile_check_list+0x370/0x370 [ 37.018541] ? check_noncircular+0x20/0x20 [ 37.018545] ? locks_remove_file+0x3fa/0x5a0 [ 37.018550] ep_free+0x13f/0x320 [ 37.018553] ? ep_remove+0x800/0x800 [ 37.018557] ? fsnotify_first_mark+0x2b0/0x2b0 [ 37.018561] ? ep_free+0x320/0x320 [ 37.018564] ep_eventpoll_release+0x44/0x60 [ 37.018567] __fput+0x327/0x7e0 [ 37.018571] ? fput+0x140/0x140 [ 37.018575] ? _raw_spin_unlock_irq+0x27/0x70 [ 37.018579] ____fput+0x15/0x20 [ 37.018583] task_work_run+0x199/0x270 [ 37.018587] ? task_work_cancel+0x210/0x210 [ 37.018591] ? _raw_spin_unlock+0x22/0x30 [ 37.018594] ? switch_task_namespaces+0x87/0xc0 [ 37.018598] do_exit+0x9bb/0x1ad0 [ 37.018603] ? binder_ioctl+0x4a1/0x1417 [ 37.018606] ? mm_update_next_owner+0x930/0x930 [ 37.018610] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 37.018616] ? avc_ss_reset+0x110/0x110 [ 37.018618] ? mutex_unlock+0xd/0x10 [ 37.018621] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 37.018624] ? find_held_lock+0x35/0x1d0 [ 37.018630] ? lock_downgrade+0x980/0x980 [ 37.018637] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 37.018641] ? rcu_note_context_switch+0x710/0x710 [ 37.018644] ? __fd_install+0x288/0x740 [ 37.018650] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 37.018653] ? do_vfs_ioctl+0x486/0x1520 [ 37.018657] ? _cond_resched+0x14/0x30 [ 37.018661] ? ioctl_preallocate+0x2b0/0x2b0 [ 37.018665] ? selinux_capable+0x40/0x40 [ 37.018669] ? __alloc_fd+0x750/0x750 [ 37.018674] do_group_exit+0x149/0x400 [ 37.018678] ? SyS_exit+0x30/0x30 [ 37.018682] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 37.018686] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 37.018690] SyS_exit_group+0x1d/0x20 [ 37.018694] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 37.018696] RIP: 0033:0x4429f8 [ 37.018698] RSP: 002b:00007fff554ddc88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 37.018701] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004429f8 [ 37.018703] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 37.018705] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 37.018707] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 37.018709] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 37.040681] Dumping ftrace buffer: [ 37.040684] (ftrace buffer empty) [ 37.040686] Kernel Offset: disabled [ 38.173000] Rebooting in 86400 seconds..