[?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.569594] audit: type=1400 audit(1514657539.580:6): avc: denied { map } for pid=3128 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 '10.128.15.225' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 30.120522] audit: type=1400 audit(1514657558.131:7): avc: denied { map } for pid=3145 comm="syzkaller778366" path="/root/syzkaller778366535" 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 [ 30.123944] ================================================================== [ 30.123955] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 30.123959] Read of size 8 at addr ffff8801ca48a678 by task syzkaller778366/3145 [ 30.123959] [ 30.123965] CPU: 0 PID: 3145 Comm: syzkaller778366 Not tainted 4.15.0-rc4-next-20171221+ #78 [ 30.123967] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.123969] Call Trace: [ 30.123975] dump_stack+0x194/0x257 [ 30.123980] ? arch_local_irq_restore+0x53/0x53 [ 30.123985] ? show_regs_print_info+0x18/0x18 [ 30.123989] ? print_irqtrace_events+0x270/0x270 [ 30.123993] ? __lock_acquire+0x664/0x3e00 [ 30.123997] ? __lock_acquire+0x3d4d/0x3e00 [ 30.124007] print_address_description+0x73/0x250 [ 30.124011] ? __lock_acquire+0x3d4d/0x3e00 [ 30.124015] kasan_report+0x25b/0x340 [ 30.124020] __asan_report_load8_noabort+0x14/0x20 [ 30.124024] __lock_acquire+0x3d4d/0x3e00 [ 30.124027] ? __lock_acquire+0x664/0x3e00 [ 30.124031] ? lock_downgrade+0x980/0x980 [ 30.124034] ? lock_downgrade+0x980/0x980 [ 30.124040] ? remove_wait_queue+0x81/0x350 [ 30.124045] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.124049] ? __lock_acquire+0x664/0x3e00 [ 30.124053] ? check_noncircular+0x20/0x20 [ 30.124061] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.124066] ? lock_acquire+0x1d5/0x580 [ 30.124069] ? lock_acquire+0x1d5/0x580 [ 30.124074] ? ep_free+0xf4/0x320 [ 30.124079] ? lock_release+0xa40/0xa40 [ 30.124084] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 30.124088] ? print_irqtrace_events+0x270/0x270 [ 30.124094] ? rcu_note_context_switch+0x710/0x710 [ 30.124098] ? __might_sleep+0x95/0x190 [ 30.124102] ? ep_free+0xf4/0x320 [ 30.124108] ? __mutex_lock+0x16f/0x1a80 [ 30.124111] ? ep_free+0xf4/0x320 [ 30.124115] ? print_irqtrace_events+0x270/0x270 [ 30.124118] ? ep_free+0xf4/0x320 [ 30.124123] lock_acquire+0x1d5/0x580 [ 30.124127] ? lock_acquire+0x1d5/0x580 [ 30.124130] ? remove_wait_queue+0x81/0x350 [ 30.124134] ? __lock_acquire+0x664/0x3e00 [ 30.124138] ? lock_release+0xa40/0xa40 [ 30.124144] ? lock_acquire+0x1d5/0x580 [ 30.124147] ? lock_acquire+0x1d5/0x580 [ 30.124151] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 30.124156] _raw_spin_lock_irqsave+0x96/0xc0 [ 30.124160] ? remove_wait_queue+0x81/0x350 [ 30.124164] remove_wait_queue+0x81/0x350 [ 30.124169] ? add_wait_queue+0x290/0x290 [ 30.124172] ? rcutorture_record_progress+0x10/0x10 [ 30.124178] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 30.124185] ? __kernel_text_address+0xd/0x40 [ 30.124190] ? clear_tfile_check_list+0x370/0x370 [ 30.124195] ? check_noncircular+0x20/0x20 [ 30.124201] ? locks_remove_file+0x3fa/0x5a0 [ 30.124206] ep_free+0x13f/0x320 [ 30.124210] ? ep_remove+0x800/0x800 [ 30.124214] ? fsnotify_first_mark+0x2b0/0x2b0 [ 30.124218] ? ep_free+0x320/0x320 [ 30.124222] ep_eventpoll_release+0x44/0x60 [ 30.124227] __fput+0x327/0x7e0 [ 30.124232] ? fput+0x140/0x140 [ 30.124236] ? _raw_spin_unlock_irq+0x27/0x70 [ 30.124241] ____fput+0x15/0x20 [ 30.124245] task_work_run+0x199/0x270 [ 30.124250] ? task_work_cancel+0x210/0x210 [ 30.124254] ? _raw_spin_unlock+0x22/0x30 [ 30.124257] ? switch_task_namespaces+0x87/0xc0 [ 30.124263] do_exit+0x9bb/0x1ad0 [ 30.124270] ? binder_ioctl+0x491/0x1417 [ 30.124273] ? mm_update_next_owner+0x930/0x930 [ 30.124278] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 30.124284] ? avc_ss_reset+0x110/0x110 [ 30.124288] ? mutex_unlock+0xd/0x10 [ 30.124292] ? SyS_epoll_ctl+0x30a/0x1a80 [ 30.124304] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 30.124307] ? up_read+0x1a/0x40 [ 30.124311] ? rcu_note_context_switch+0x710/0x710 [ 30.124315] ? __fd_install+0x288/0x740 [ 30.124320] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 30.124323] ? do_vfs_ioctl+0x486/0x1520 [ 30.124327] ? _cond_resched+0x14/0x30 [ 30.124332] ? ioctl_preallocate+0x2b0/0x2b0 [ 30.124336] ? selinux_capable+0x40/0x40 [ 30.124340] ? __alloc_fd+0x750/0x750 [ 30.124345] do_group_exit+0x149/0x400 [ 30.124350] ? SyS_exit+0x30/0x30 [ 30.124354] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 30.124359] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 30.124364] SyS_exit_group+0x1d/0x20 [ 30.124368] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 30.124371] RIP: 0033:0x4429f8 [ 30.124373] RSP: 002b:00007ffd48f8e988 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 30.124377] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 30.124380] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 30.124382] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 30.124384] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 30.124386] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 30.124391] [ 30.124393] Allocated by task 3145: [ 30.124397] save_stack+0x43/0xd0 [ 30.124399] kasan_kmalloc+0xad/0xe0 [ 30.124403] kmem_cache_alloc_trace+0x136/0x750 [ 30.124405] binder_get_thread+0x1cf/0x870 [ 30.124408] binder_poll+0x8c/0x390 [ 30.124411] ep_item_poll.isra.10+0xf2/0x320 [ 30.124413] ep_insert+0x6a2/0x1ac0 [ 30.124416] SyS_epoll_ctl+0x12bf/0x1a80 [ 30.124420] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 30.124420] [ 30.124422] Freed by task 3145: [ 30.124424] save_stack+0x43/0xd0 [ 30.124427] kasan_slab_free+0x71/0xc0 [ 30.124430] kfree+0xd6/0x260 [ 30.124433] binder_thread_dec_tmpref+0x27f/0x310 [ 30.124435] binder_thread_release+0x27d/0x540 [ 30.124438] binder_ioctl+0xc02/0x1417 [ 30.124440] do_vfs_ioctl+0x1b1/0x1520 [ 30.124443] SyS_ioctl+0x8f/0xc0 [ 30.124446] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 30.124446] [ 30.124449] The buggy address belongs to the object at ffff8801ca48a5c0 [ 30.124449] which belongs to the cache kmalloc-512 of size 512 [ 30.124452] The buggy address is located 184 bytes inside of [ 30.124452] 512-byte region [ffff8801ca48a5c0, ffff8801ca48a7c0) [ 30.124453] The buggy address belongs to the page: [ 30.124457] page:000000009d63bae0 count:1 mapcount:0 mapping:00000000b77f47bf index:0x0 [ 30.124460] flags: 0x2fffc0000000100(slab) [ 30.124466] raw: 02fffc0000000100 ffff8801ca48a0c0 0000000000000000 0000000100000006 [ 30.124470] raw: ffffea000731a420 ffffea00072fefa0 ffff8801dac00940 0000000000000000 [ 30.124471] page dumped because: kasan: bad access detected [ 30.124472] [ 30.124473] Memory state around the buggy address: [ 30.124476] ffff8801ca48a500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 30.124478] ffff8801ca48a580: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 30.124481] >ffff8801ca48a600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.124483] ^ [ 30.124485] ffff8801ca48a680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.124488] ffff8801ca48a700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.124489] ================================================================== [ 30.124490] Disabling lock debugging due to kernel taint [ 30.124492] Kernel panic - not syncing: panic_on_warn set ... [ 30.124492] [ 30.124496] CPU: 0 PID: 3145 Comm: syzkaller778366 Tainted: G B 4.15.0-rc4-next-20171221+ #78 [ 30.124498] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.124499] Call Trace: [ 30.124502] dump_stack+0x194/0x257 [ 30.124506] ? arch_local_irq_restore+0x53/0x53 [ 30.124510] ? kasan_end_report+0x32/0x50 [ 30.124513] ? lock_downgrade+0x980/0x980 [ 30.124517] ? vsnprintf+0x1ed/0x1900 [ 30.124521] ? __lock_acquire+0x3d30/0x3e00 [ 30.124524] panic+0x1e4/0x41c [ 30.124528] ? refcount_error_report+0x214/0x214 [ 30.124532] ? add_taint+0x40/0x50 [ 30.124535] ? add_taint+0x1c/0x50 [ 30.124539] ? __lock_acquire+0x3d4d/0x3e00 [ 30.124542] kasan_end_report+0x50/0x50 [ 30.124546] kasan_report+0x144/0x340 [ 30.124551] __asan_report_load8_noabort+0x14/0x20 [ 30.124554] __lock_acquire+0x3d4d/0x3e00 [ 30.124558] ? __lock_acquire+0x664/0x3e00 [ 30.124561] ? lock_downgrade+0x980/0x980 [ 30.124564] ? lock_downgrade+0x980/0x980 [ 30.124569] ? remove_wait_queue+0x81/0x350 [ 30.124574] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.124578] ? __lock_acquire+0x664/0x3e00 [ 30.124581] ? check_noncircular+0x20/0x20 [ 30.124587] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.124592] ? lock_acquire+0x1d5/0x580 [ 30.124595] ? lock_acquire+0x1d5/0x580 [ 30.124598] ? ep_free+0xf4/0x320 [ 30.124603] ? lock_release+0xa40/0xa40 [ 30.124606] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 30.124610] ? print_irqtrace_events+0x270/0x270 [ 30.124614] ? rcu_note_context_switch+0x710/0x710 [ 30.124618] ? __might_sleep+0x95/0x190 [ 30.124622] ? ep_free+0xf4/0x320 [ 30.124625] ? __mutex_lock+0x16f/0x1a80 [ 30.124628] ? ep_free+0xf4/0x320 [ 30.124632] ? print_irqtrace_events+0x270/0x270 [ 30.124635] ? ep_free+0xf4/0x320 [ 30.124640] lock_acquire+0x1d5/0x580 [ 30.124643] ? lock_acquire+0x1d5/0x580 [ 30.124646] ? remove_wait_queue+0x81/0x350 [ 30.124650] ? __lock_acquire+0x664/0x3e00 [ 30.124654] ? lock_release+0xa40/0xa40 [ 30.124659] ? lock_acquire+0x1d5/0x580 [ 30.124662] ? lock_acquire+0x1d5/0x580 [ 30.124666] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 30.124670] _raw_spin_lock_irqsave+0x96/0xc0 [ 30.124674] ? remove_wait_queue+0x81/0x350 [ 30.124678] remove_wait_queue+0x81/0x350 [ 30.124682] ? add_wait_queue+0x290/0x290 [ 30.124685] ? rcutorture_record_progress+0x10/0x10 [ 30.124691] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 30.124695] ? __kernel_text_address+0xd/0x40 [ 30.124700] ? clear_tfile_check_list+0x370/0x370 [ 30.124704] ? check_noncircular+0x20/0x20 [ 30.124709] ? locks_remove_file+0x3fa/0x5a0 [ 30.124714] ep_free+0x13f/0x320 [ 30.124717] ? ep_remove+0x800/0x800 [ 30.124721] ? fsnotify_first_mark+0x2b0/0x2b0 [ 30.124725] ? ep_free+0x320/0x320 [ 30.124728] ep_eventpoll_release+0x44/0x60 [ 30.124732] __fput+0x327/0x7e0 [ 30.124737] ? fput+0x140/0x140 [ 30.124740] ? _raw_spin_unlock_irq+0x27/0x70 [ 30.124745] ____fput+0x15/0x20 [ 30.124749] task_work_run+0x199/0x270 [ 30.124759] ? task_work_cancel+0x210/0x210 [ 30.124763] ? _raw_spin_unlock+0x22/0x30 [ 30.124766] ? switch_task_namespaces+0x87/0xc0 [ 30.124771] do_exit+0x9bb/0x1ad0 [ 30.124775] ? binder_ioctl+0x491/0x1417 [ 30.124778] ? mm_update_next_owner+0x930/0x930 [ 30.124783] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 30.124787] ? avc_ss_reset+0x110/0x110 [ 30.124791] ? mutex_unlock+0xd/0x10 [ 30.124795] ? SyS_epoll_ctl+0x30a/0x1a80 [ 30.124805] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 30.124808] ? up_read+0x1a/0x40 [ 30.124812] ? rcu_note_context_switch+0x710/0x710 [ 30.124815] ? __fd_install+0x288/0x740 [ 30.124820] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 30.124823] ? do_vfs_ioctl+0x486/0x1520 [ 30.124826] ? _cond_resched+0x14/0x30 [ 30.124830] ? ioctl_preallocate+0x2b0/0x2b0 [ 30.124835] ? selinux_capable+0x40/0x40 [ 30.124838] ? __alloc_fd+0x750/0x750 [ 30.124843] do_group_exit+0x149/0x400 [ 30.124847] ? SyS_exit+0x30/0x30 [ 30.124851] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 30.124855] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 30.124859] SyS_exit_group+0x1d/0x20 [ 30.124863] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 30.124865] RIP: 0033:0x4429f8 [ 30.124867] RSP: 002b:00007ffd48f8e988 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 30.124871] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 30.124873] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 30.124875] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 30.124877] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 30.124879] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 30.146395] Dumping ftrace buffer: [ 30.146398] (ftrace buffer empty) [ 30.146400] Kernel Offset: disabled [ 31.272957] Rebooting in 86400 seconds..