[?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.117161] audit: type=1400 audit(1514838392.240: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.211' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.311665] audit: type=1400 audit(1514838398.435:7): avc: denied { map } for pid=3142 comm="syzkaller098935" path="/root/syzkaller098935600" 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.316561] ================================================================== [ 18.316583] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 18.316588] Read of size 8 at addr ffff8801ca2795f8 by task syzkaller098935/3142 [ 18.316590] [ 18.316598] CPU: 0 PID: 3142 Comm: syzkaller098935 Not tainted 4.15.0-rc4-mm1+ #49 [ 18.316601] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.316604] Call Trace: [ 18.316614] dump_stack+0x194/0x257 [ 18.316622] ? arch_local_irq_restore+0x53/0x53 [ 18.316630] ? show_regs_print_info+0x18/0x18 [ 18.316636] ? print_irqtrace_events+0x270/0x270 [ 18.316642] ? __lock_acquire+0x664/0x3e00 [ 18.316649] ? __lock_acquire+0x3d4d/0x3e00 [ 18.316659] print_address_description+0x73/0x250 [ 18.316664] ? __lock_acquire+0x3d4d/0x3e00 [ 18.316671] kasan_report+0x23b/0x360 [ 18.316679] __asan_report_load8_noabort+0x14/0x20 [ 18.316684] __lock_acquire+0x3d4d/0x3e00 [ 18.316690] ? __lock_acquire+0x664/0x3e00 [ 18.316696] ? lock_downgrade+0x980/0x980 [ 18.316701] ? lock_downgrade+0x980/0x980 [ 18.316710] ? remove_wait_queue+0x81/0x350 [ 18.316719] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.316726] ? __lock_acquire+0x664/0x3e00 [ 18.316731] ? check_noncircular+0x20/0x20 [ 18.316743] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.316750] ? lock_acquire+0x1d5/0x580 [ 18.316756] ? lock_acquire+0x1d5/0x580 [ 18.316763] ? ep_free+0xf4/0x320 [ 18.316772] ? lock_release+0xa40/0xa40 [ 18.316778] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.316784] ? print_irqtrace_events+0x270/0x270 [ 18.316792] ? rcu_note_context_switch+0x710/0x710 [ 18.316799] ? __might_sleep+0x95/0x190 [ 18.316805] ? ep_free+0xf4/0x320 [ 18.316811] ? __mutex_lock+0x16f/0x1a80 [ 18.316816] ? ep_free+0xf4/0x320 [ 18.316823] ? print_irqtrace_events+0x270/0x270 [ 18.316828] ? ep_free+0xf4/0x320 [ 18.316836] lock_acquire+0x1d5/0x580 [ 18.316841] ? lock_acquire+0x1d5/0x580 [ 18.316847] ? remove_wait_queue+0x81/0x350 [ 18.316852] ? __lock_acquire+0x664/0x3e00 [ 18.316860] ? lock_release+0xa40/0xa40 [ 18.316869] ? lock_acquire+0x1d5/0x580 [ 18.316874] ? lock_acquire+0x1d5/0x580 [ 18.316880] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 18.316887] _raw_spin_lock_irqsave+0x96/0xc0 [ 18.316892] ? remove_wait_queue+0x81/0x350 [ 18.316899] remove_wait_queue+0x81/0x350 [ 18.316906] ? add_wait_queue+0x290/0x290 [ 18.316912] ? rcutorture_record_progress+0x10/0x10 [ 18.316922] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 18.316930] ? __kernel_text_address+0xd/0x40 [ 18.316938] ? clear_tfile_check_list+0x370/0x370 [ 18.316945] ? check_noncircular+0x20/0x20 [ 18.316954] ? locks_remove_file+0x3fa/0x5a0 [ 18.316963] ep_free+0x13f/0x320 [ 18.316969] ? ep_remove+0x800/0x800 [ 18.316975] ? fsnotify_first_mark+0x2b0/0x2b0 [ 18.316982] ? ep_free+0x320/0x320 [ 18.316988] ep_eventpoll_release+0x44/0x60 [ 18.316995] __fput+0x327/0x7e0 [ 18.317006] ? fput+0x140/0x140 [ 18.317013] ? _raw_spin_unlock_irq+0x27/0x70 [ 18.317021] ____fput+0x15/0x20 [ 18.317027] task_work_run+0x199/0x270 [ 18.317035] ? task_work_cancel+0x210/0x210 [ 18.317041] ? _raw_spin_unlock+0x22/0x30 [ 18.317047] ? switch_task_namespaces+0x87/0xc0 [ 18.317056] do_exit+0x9bb/0x1ad0 [ 18.317065] ? binder_ioctl+0x551/0x1417 [ 18.317071] ? mm_update_next_owner+0x930/0x930 [ 18.317078] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 18.317089] ? avc_ss_reset+0x110/0x110 [ 18.317098] ? mutex_unlock+0xd/0x10 [ 18.317103] ? SyS_epoll_ctl+0x30a/0x1a80 [ 18.317123] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.317128] ? up_read+0x1a/0x40 [ 18.317134] ? rcu_note_context_switch+0x710/0x710 [ 18.317141] ? __fd_install+0x288/0x740 [ 18.317150] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 18.317156] ? do_vfs_ioctl+0x486/0x1520 [ 18.317161] ? _cond_resched+0x14/0x30 [ 18.317169] ? ioctl_preallocate+0x2b0/0x2b0 [ 18.317178] ? selinux_capable+0x40/0x40 [ 18.317184] ? __alloc_fd+0x750/0x750 [ 18.317192] do_group_exit+0x149/0x400 [ 18.317199] ? SyS_exit+0x30/0x30 [ 18.317206] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 18.317215] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 18.317223] SyS_exit_group+0x1d/0x20 [ 18.317229] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.317234] RIP: 0033:0x4429f8 [ 18.317237] RSP: 002b:00007ffdd323dc38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 18.317244] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 18.317247] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 18.317251] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 18.317254] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 18.317257] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 18.317265] [ 18.317268] Allocated by task 3142: [ 18.317274] save_stack+0x43/0xd0 [ 18.317279] kasan_kmalloc+0xad/0xe0 [ 18.317284] kmem_cache_alloc_trace+0x136/0x750 [ 18.317289] binder_get_thread+0x1cf/0x870 [ 18.317293] binder_poll+0x8c/0x390 [ 18.317298] ep_item_poll.isra.10+0xf2/0x320 [ 18.317302] ep_insert+0x6a2/0x1ac0 [ 18.317307] SyS_epoll_ctl+0x12bf/0x1a80 [ 18.317312] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.317313] [ 18.317315] Freed by task 3142: [ 18.317319] save_stack+0x43/0xd0 [ 18.317324] kasan_slab_free+0x71/0xc0 [ 18.317328] kfree+0xd6/0x260 [ 18.317333] binder_thread_dec_tmpref+0x27f/0x310 [ 18.317337] binder_thread_release+0x27d/0x540 [ 18.317342] binder_ioctl+0xc02/0x1417 [ 18.317346] do_vfs_ioctl+0x1b1/0x1520 [ 18.317350] SyS_ioctl+0x8f/0xc0 [ 18.317355] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.317356] [ 18.317360] The buggy address belongs to the object at ffff8801ca279540 [ 18.317360] which belongs to the cache kmalloc-512 of size 512 [ 18.317365] The buggy address is located 184 bytes inside of [ 18.317365] 512-byte region [ffff8801ca279540, ffff8801ca279740) [ 18.317367] The buggy address belongs to the page: [ 18.317372] page:ffffea0007289e40 count:1 mapcount:0 mapping:ffff8801ca279040 index:0x0 [ 18.317377] flags: 0x2fffc0000000100(slab) [ 18.317386] raw: 02fffc0000000100 ffff8801ca279040 0000000000000000 0000000100000006 [ 18.317392] raw: ffffea00072775a0 ffffea0007259ca0 ffff8801dac00940 0000000000000000 [ 18.317395] page dumped because: kasan: bad access detected [ 18.317396] [ 18.317398] Memory state around the buggy address: [ 18.317402] ffff8801ca279480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 18.317407] ffff8801ca279500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 18.317411] >ffff8801ca279580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.317414] ^ [ 18.317418] ffff8801ca279600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.317422] ffff8801ca279680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.317424] ================================================================== [ 18.317426] Disabling lock debugging due to kernel taint [ 18.317429] Kernel panic - not syncing: panic_on_warn set ... [ 18.317429] [ 18.317435] CPU: 0 PID: 3142 Comm: syzkaller098935 Tainted: G B 4.15.0-rc4-mm1+ #49 [ 18.317438] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.317440] Call Trace: [ 18.317445] dump_stack+0x194/0x257 [ 18.317452] ? arch_local_irq_restore+0x53/0x53 [ 18.317457] ? kasan_end_report+0x32/0x50 [ 18.317463] ? lock_downgrade+0x980/0x980 [ 18.317469] ? vsnprintf+0x1ed/0x1900 [ 18.317475] ? __lock_acquire+0x3c90/0x3e00 [ 18.317480] panic+0x1e4/0x41c [ 18.317486] ? refcount_error_report+0x214/0x214 [ 18.317493] ? add_taint+0x40/0x50 [ 18.317498] ? add_taint+0x1c/0x50 [ 18.317505] ? __lock_acquire+0x3d4d/0x3e00 [ 18.317511] kasan_end_report+0x50/0x50 [ 18.317517] kasan_report+0x148/0x360 [ 18.317525] __asan_report_load8_noabort+0x14/0x20 [ 18.317530] __lock_acquire+0x3d4d/0x3e00 [ 18.317536] ? __lock_acquire+0x664/0x3e00 [ 18.317541] ? lock_downgrade+0x980/0x980 [ 18.317546] ? lock_downgrade+0x980/0x980 [ 18.317554] ? remove_wait_queue+0x81/0x350 [ 18.317562] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.317569] ? __lock_acquire+0x664/0x3e00 [ 18.317574] ? check_noncircular+0x20/0x20 [ 18.317591] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.317598] ? lock_acquire+0x1d5/0x580 [ 18.317604] ? lock_acquire+0x1d5/0x580 [ 18.317609] ? ep_free+0xf4/0x320 [ 18.317617] ? lock_release+0xa40/0xa40 [ 18.317623] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.317629] ? print_irqtrace_events+0x270/0x270 [ 18.317635] ? rcu_note_context_switch+0x710/0x710 [ 18.317642] ? __might_sleep+0x95/0x190 [ 18.317648] ? ep_free+0xf4/0x320 [ 18.317653] ? __mutex_lock+0x16f/0x1a80 [ 18.317657] ? ep_free+0xf4/0x320 [ 18.317664] ? print_irqtrace_events+0x270/0x270 [ 18.317669] ? ep_free+0xf4/0x320 [ 18.317677] lock_acquire+0x1d5/0x580 [ 18.317682] ? lock_acquire+0x1d5/0x580 [ 18.317687] ? remove_wait_queue+0x81/0x350 [ 18.317693] ? __lock_acquire+0x664/0x3e00 [ 18.317700] ? lock_release+0xa40/0xa40 [ 18.317709] ? lock_acquire+0x1d5/0x580 [ 18.317714] ? lock_acquire+0x1d5/0x580 [ 18.317720] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 18.317727] _raw_spin_lock_irqsave+0x96/0xc0 [ 18.317733] ? remove_wait_queue+0x81/0x350 [ 18.317739] remove_wait_queue+0x81/0x350 [ 18.317746] ? add_wait_queue+0x290/0x290 [ 18.317752] ? rcutorture_record_progress+0x10/0x10 [ 18.317761] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 18.317768] ? __kernel_text_address+0xd/0x40 [ 18.317775] ? clear_tfile_check_list+0x370/0x370 [ 18.317782] ? check_noncircular+0x20/0x20 [ 18.317790] ? locks_remove_file+0x3fa/0x5a0 [ 18.317799] ep_free+0x13f/0x320 [ 18.317805] ? ep_remove+0x800/0x800 [ 18.317810] ? fsnotify_first_mark+0x2b0/0x2b0 [ 18.317817] ? ep_free+0x320/0x320 [ 18.317823] ep_eventpoll_release+0x44/0x60 [ 18.317829] __fput+0x327/0x7e0 [ 18.317837] ? fput+0x140/0x140 [ 18.317843] ? _raw_spin_unlock_irq+0x27/0x70 [ 18.317851] ____fput+0x15/0x20 [ 18.317857] task_work_run+0x199/0x270 [ 18.317865] ? task_work_cancel+0x210/0x210 [ 18.317870] ? _raw_spin_unlock+0x22/0x30 [ 18.317876] ? switch_task_namespaces+0x87/0xc0 [ 18.317883] do_exit+0x9bb/0x1ad0 [ 18.317890] ? binder_ioctl+0x551/0x1417 [ 18.317896] ? mm_update_next_owner+0x930/0x930 [ 18.317904] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 18.317912] ? avc_ss_reset+0x110/0x110 [ 18.317917] ? mutex_unlock+0xd/0x10 [ 18.317923] ? SyS_epoll_ctl+0x30a/0x1a80 [ 18.317941] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.317946] ? up_read+0x1a/0x40 [ 18.317952] ? rcu_note_context_switch+0x710/0x710 [ 18.317957] ? __fd_install+0x288/0x740 [ 18.317965] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 18.317970] ? do_vfs_ioctl+0x486/0x1520 [ 18.317976] ? _cond_resched+0x14/0x30 [ 18.317983] ? ioctl_preallocate+0x2b0/0x2b0 [ 18.317989] ? selinux_capable+0x40/0x40 [ 18.317995] ? __alloc_fd+0x750/0x750 [ 18.318003] do_group_exit+0x149/0x400 [ 18.318010] ? SyS_exit+0x30/0x30 [ 18.318016] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 18.318022] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 18.318030] SyS_exit_group+0x1d/0x20 [ 18.318036] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 18.318039] RIP: 0033:0x4429f8 [ 18.318042] RSP: 002b:00007ffdd323dc38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 18.318048] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 18.318051] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 18.318054] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 18.318058] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 18.318061] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 18.338015] Dumping ftrace buffer: [ 18.338018] (ftrace buffer empty) [ 18.338021] Kernel Offset: disabled [ 19.463032] Rebooting in 86400 seconds..