[?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. [ 11.276794] audit: type=1400 audit(1514411968.849: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 '10.128.15.246' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 17.411464] audit: type=1400 audit(1514411974.984:7): avc: denied { map } for pid=3148 comm="syzkaller998494" path="/root/syzkaller998494349" 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 [ 17.415877] ================================================================== [ 17.415890] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 17.415896] Read of size 8 at addr ffff8801c88ec178 by task syzkaller998494/3148 [ 17.415897] [ 17.415904] CPU: 1 PID: 3148 Comm: syzkaller998494 Not tainted 4.15.0-rc4-next-20171221+ #78 [ 17.415907] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 17.415910] Call Trace: [ 17.415917] dump_stack+0x194/0x257 [ 17.415925] ? arch_local_irq_restore+0x53/0x53 [ 17.415933] ? show_regs_print_info+0x18/0x18 [ 17.415939] ? print_irqtrace_events+0x270/0x270 [ 17.415945] ? __lock_acquire+0x664/0x3e00 [ 17.415952] ? __lock_acquire+0x3d4d/0x3e00 [ 17.415960] print_address_description+0x73/0x250 [ 17.415966] ? __lock_acquire+0x3d4d/0x3e00 [ 17.415973] kasan_report+0x25b/0x340 [ 17.415981] __asan_report_load8_noabort+0x14/0x20 [ 17.415987] __lock_acquire+0x3d4d/0x3e00 [ 17.415992] ? __lock_acquire+0x664/0x3e00 [ 17.415998] ? lock_downgrade+0x980/0x980 [ 17.416007] ? lock_downgrade+0x980/0x980 [ 17.416015] ? remove_wait_queue+0x81/0x350 [ 17.416025] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.416031] ? __lock_acquire+0x664/0x3e00 [ 17.416037] ? check_noncircular+0x20/0x20 [ 17.416049] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.416057] ? lock_acquire+0x1d5/0x580 [ 17.416062] ? lock_acquire+0x1d5/0x580 [ 17.416069] ? ep_free+0xf4/0x320 [ 17.416078] ? lock_release+0xa40/0xa40 [ 17.416084] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.416091] ? print_irqtrace_events+0x270/0x270 [ 17.416098] ? rcu_note_context_switch+0x710/0x710 [ 17.416106] ? __might_sleep+0x95/0x190 [ 17.416111] ? ep_free+0xf4/0x320 [ 17.416119] ? __mutex_lock+0x16f/0x1a80 [ 17.416124] ? ep_free+0xf4/0x320 [ 17.416131] ? print_irqtrace_events+0x270/0x270 [ 17.416135] ? ep_free+0xf4/0x320 [ 17.416144] lock_acquire+0x1d5/0x580 [ 17.416149] ? lock_acquire+0x1d5/0x580 [ 17.416155] ? remove_wait_queue+0x81/0x350 [ 17.416161] ? __lock_acquire+0x664/0x3e00 [ 17.416169] ? lock_release+0xa40/0xa40 [ 17.416178] ? lock_acquire+0x1d5/0x580 [ 17.416183] ? lock_acquire+0x1d5/0x580 [ 17.416189] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 17.416197] _raw_spin_lock_irqsave+0x96/0xc0 [ 17.416203] ? remove_wait_queue+0x81/0x350 [ 17.416209] remove_wait_queue+0x81/0x350 [ 17.416217] ? add_wait_queue+0x290/0x290 [ 17.416223] ? rcutorture_record_progress+0x10/0x10 [ 17.416233] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 17.416240] ? __kernel_text_address+0xd/0x40 [ 17.416249] ? clear_tfile_check_list+0x370/0x370 [ 17.416257] ? check_noncircular+0x20/0x20 [ 17.416265] ? locks_remove_file+0x3fa/0x5a0 [ 17.416275] ep_free+0x13f/0x320 [ 17.416281] ? ep_remove+0x800/0x800 [ 17.416286] ? fsnotify_first_mark+0x2b0/0x2b0 [ 17.416294] ? ep_free+0x320/0x320 [ 17.416300] ep_eventpoll_release+0x44/0x60 [ 17.416306] __fput+0x327/0x7e0 [ 17.416315] ? fput+0x140/0x140 [ 17.416321] ? _raw_spin_unlock_irq+0x27/0x70 [ 17.416330] ____fput+0x15/0x20 [ 17.416336] task_work_run+0x199/0x270 [ 17.416344] ? task_work_cancel+0x210/0x210 [ 17.416350] ? _raw_spin_unlock+0x22/0x30 [ 17.416356] ? switch_task_namespaces+0x87/0xc0 [ 17.416364] do_exit+0x9bb/0x1ad0 [ 17.416373] ? binder_ioctl+0x491/0x1417 [ 17.416379] ? mm_update_next_owner+0x930/0x930 [ 17.416387] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 17.416396] ? avc_ss_reset+0x110/0x110 [ 17.416402] ? mutex_unlock+0xd/0x10 [ 17.416408] ? SyS_epoll_ctl+0x30a/0x1a80 [ 17.416428] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.416433] ? up_read+0x1a/0x40 [ 17.416439] ? rcu_note_context_switch+0x710/0x710 [ 17.416445] ? __fd_install+0x288/0x740 [ 17.416454] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 17.416460] ? do_vfs_ioctl+0x486/0x1520 [ 17.416465] ? _cond_resched+0x14/0x30 [ 17.416473] ? ioctl_preallocate+0x2b0/0x2b0 [ 17.416480] ? selinux_capable+0x40/0x40 [ 17.416487] ? __alloc_fd+0x750/0x750 [ 17.416495] do_group_exit+0x149/0x400 [ 17.416502] ? SyS_exit+0x30/0x30 [ 17.416509] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 17.416516] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 17.416524] SyS_exit_group+0x1d/0x20 [ 17.416530] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.416535] RIP: 0033:0x4429f8 [ 17.416538] RSP: 002b:00007ffe62da3a58 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 17.416544] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 17.416548] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 17.416551] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 17.416554] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 17.416558] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 17.416566] [ 17.416569] Allocated by task 3148: [ 17.416575] save_stack+0x43/0xd0 [ 17.416580] kasan_kmalloc+0xad/0xe0 [ 17.416585] kmem_cache_alloc_trace+0x136/0x750 [ 17.416590] binder_get_thread+0x1cf/0x870 [ 17.416594] binder_poll+0x8c/0x390 [ 17.416599] ep_item_poll.isra.10+0xf2/0x320 [ 17.416603] ep_insert+0x6a2/0x1ac0 [ 17.416608] SyS_epoll_ctl+0x12bf/0x1a80 [ 17.416617] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.416618] [ 17.416620] Freed by task 3148: [ 17.416625] save_stack+0x43/0xd0 [ 17.416630] kasan_slab_free+0x71/0xc0 [ 17.416633] kfree+0xd6/0x260 [ 17.416638] binder_thread_dec_tmpref+0x27f/0x310 [ 17.416643] binder_thread_release+0x27d/0x540 [ 17.416647] binder_ioctl+0xc02/0x1417 [ 17.416651] do_vfs_ioctl+0x1b1/0x1520 [ 17.416656] SyS_ioctl+0x8f/0xc0 [ 17.416661] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.416662] [ 17.416666] The buggy address belongs to the object at ffff8801c88ec0c0 [ 17.416666] which belongs to the cache kmalloc-512 of size 512 [ 17.416671] The buggy address is located 184 bytes inside of [ 17.416671] 512-byte region [ffff8801c88ec0c0, ffff8801c88ec2c0) [ 17.416673] The buggy address belongs to the page: [ 17.416678] page:00000000f7ed4e73 count:1 mapcount:0 mapping:000000005e3bbf8a index:0x0 [ 17.416683] flags: 0x2fffc0000000100(slab) [ 17.416692] raw: 02fffc0000000100 ffff8801c88ec0c0 0000000000000000 0000000100000006 [ 17.416699] raw: ffffea0007223920 ffffea0007236920 ffff8801dac00940 0000000000000000 [ 17.416701] page dumped because: kasan: bad access detected [ 17.416702] [ 17.416704] Memory state around the buggy address: [ 17.416708] ffff8801c88ec000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.416713] ffff8801c88ec080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 17.416717] >ffff8801c88ec100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.416719] ^ [ 17.416724] ffff8801c88ec180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.416728] ffff8801c88ec200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.416730] ================================================================== [ 17.416732] Disabling lock debugging due to kernel taint [ 17.416735] Kernel panic - not syncing: panic_on_warn set ... [ 17.416735] [ 17.416741] CPU: 1 PID: 3148 Comm: syzkaller998494 Tainted: G B 4.15.0-rc4-next-20171221+ #78 [ 17.416744] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 17.416745] Call Trace: [ 17.416751] dump_stack+0x194/0x257 [ 17.416758] ? arch_local_irq_restore+0x53/0x53 [ 17.416763] ? kasan_end_report+0x32/0x50 [ 17.416770] ? lock_downgrade+0x980/0x980 [ 17.416775] ? vsnprintf+0x1ed/0x1900 [ 17.416781] ? __lock_acquire+0x3d30/0x3e00 [ 17.416787] panic+0x1e4/0x41c [ 17.416793] ? refcount_error_report+0x214/0x214 [ 17.416800] ? add_taint+0x40/0x50 [ 17.416805] ? add_taint+0x1c/0x50 [ 17.416812] ? __lock_acquire+0x3d4d/0x3e00 [ 17.416818] kasan_end_report+0x50/0x50 [ 17.416824] kasan_report+0x144/0x340 [ 17.416832] __asan_report_load8_noabort+0x14/0x20 [ 17.416837] __lock_acquire+0x3d4d/0x3e00 [ 17.416843] ? __lock_acquire+0x664/0x3e00 [ 17.416849] ? lock_downgrade+0x980/0x980 [ 17.416854] ? lock_downgrade+0x980/0x980 [ 17.416861] ? remove_wait_queue+0x81/0x350 [ 17.416870] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.416877] ? __lock_acquire+0x664/0x3e00 [ 17.416882] ? check_noncircular+0x20/0x20 [ 17.416894] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.416901] ? lock_acquire+0x1d5/0x580 [ 17.416906] ? lock_acquire+0x1d5/0x580 [ 17.416911] ? ep_free+0xf4/0x320 [ 17.416920] ? lock_release+0xa40/0xa40 [ 17.416926] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.416932] ? print_irqtrace_events+0x270/0x270 [ 17.416938] ? rcu_note_context_switch+0x710/0x710 [ 17.416946] ? __might_sleep+0x95/0x190 [ 17.416951] ? ep_free+0xf4/0x320 [ 17.416957] ? __mutex_lock+0x16f/0x1a80 [ 17.416962] ? ep_free+0xf4/0x320 [ 17.416969] ? print_irqtrace_events+0x270/0x270 [ 17.416974] ? ep_free+0xf4/0x320 [ 17.416982] lock_acquire+0x1d5/0x580 [ 17.416987] ? lock_acquire+0x1d5/0x580 [ 17.416993] ? remove_wait_queue+0x81/0x350 [ 17.416999] ? __lock_acquire+0x664/0x3e00 [ 17.417007] ? lock_release+0xa40/0xa40 [ 17.417016] ? lock_acquire+0x1d5/0x580 [ 17.417021] ? lock_acquire+0x1d5/0x580 [ 17.417027] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 17.417034] _raw_spin_lock_irqsave+0x96/0xc0 [ 17.417040] ? remove_wait_queue+0x81/0x350 [ 17.417046] remove_wait_queue+0x81/0x350 [ 17.417054] ? add_wait_queue+0x290/0x290 [ 17.417059] ? rcutorture_record_progress+0x10/0x10 [ 17.417069] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 17.417075] ? __kernel_text_address+0xd/0x40 [ 17.417083] ? clear_tfile_check_list+0x370/0x370 [ 17.417091] ? check_noncircular+0x20/0x20 [ 17.417098] ? locks_remove_file+0x3fa/0x5a0 [ 17.417107] ep_free+0x13f/0x320 [ 17.417113] ? ep_remove+0x800/0x800 [ 17.417119] ? fsnotify_first_mark+0x2b0/0x2b0 [ 17.417126] ? ep_free+0x320/0x320 [ 17.417132] ep_eventpoll_release+0x44/0x60 [ 17.417138] __fput+0x327/0x7e0 [ 17.417146] ? fput+0x140/0x140 [ 17.417152] ? _raw_spin_unlock_irq+0x27/0x70 [ 17.417161] ____fput+0x15/0x20 [ 17.417167] task_work_run+0x199/0x270 [ 17.417174] ? task_work_cancel+0x210/0x210 [ 17.417180] ? _raw_spin_unlock+0x22/0x30 [ 17.417186] ? switch_task_namespaces+0x87/0xc0 [ 17.417194] do_exit+0x9bb/0x1ad0 [ 17.417201] ? binder_ioctl+0x491/0x1417 [ 17.417207] ? mm_update_next_owner+0x930/0x930 [ 17.417214] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 17.417222] ? avc_ss_reset+0x110/0x110 [ 17.417228] ? mutex_unlock+0xd/0x10 [ 17.417234] ? SyS_epoll_ctl+0x30a/0x1a80 [ 17.417252] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.417257] ? up_read+0x1a/0x40 [ 17.417263] ? rcu_note_context_switch+0x710/0x710 [ 17.417268] ? __fd_install+0x288/0x740 [ 17.417277] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 17.417282] ? do_vfs_ioctl+0x486/0x1520 [ 17.417287] ? _cond_resched+0x14/0x30 [ 17.417295] ? ioctl_preallocate+0x2b0/0x2b0 [ 17.417302] ? selinux_capable+0x40/0x40 [ 17.417308] ? __alloc_fd+0x750/0x750 [ 17.417316] do_group_exit+0x149/0x400 [ 17.417322] ? SyS_exit+0x30/0x30 [ 17.417329] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 17.417335] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 17.417343] SyS_exit_group+0x1d/0x20 [ 17.417349] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.417352] RIP: 0033:0x4429f8 [ 17.417355] RSP: 002b:00007ffe62da3a58 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 17.417361] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 17.417364] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 17.417367] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 17.417371] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 17.417374] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 17.437733] Dumping ftrace buffer: [ 17.437737] (ftrace buffer empty) [ 17.437739] Kernel Offset: disabled [ 18.564112] Rebooting in 86400 seconds..