[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] 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.746565] audit: type=1400 audit(1514790561.415:6): avc: denied { map } for pid=3132 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.226' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 25.155140] audit: type=1400 audit(1514790574.823:7): avc: denied { map } for pid=3149 comm="syzkaller181359" path="/root/syzkaller181359440" 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 [ 25.158945] ================================================================== [ 25.158959] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 25.158963] Read of size 8 at addr ffff8801cb2a2338 by task syzkaller181359/3149 [ 25.158964] [ 25.158969] CPU: 1 PID: 3149 Comm: syzkaller181359 Not tainted 4.15.0-rc4-next-20171221+ #78 [ 25.158972] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.158974] Call Trace: [ 25.158981] dump_stack+0x194/0x257 [ 25.158986] ? arch_local_irq_restore+0x53/0x53 [ 25.158993] ? show_regs_print_info+0x18/0x18 [ 25.158997] ? print_irqtrace_events+0x270/0x270 [ 25.159004] ? __lock_acquire+0x664/0x3e00 [ 25.159009] ? __lock_acquire+0x3d4d/0x3e00 [ 25.159017] print_address_description+0x73/0x250 [ 25.159021] ? __lock_acquire+0x3d4d/0x3e00 [ 25.159025] kasan_report+0x25b/0x340 [ 25.159030] __asan_report_load8_noabort+0x14/0x20 [ 25.159033] __lock_acquire+0x3d4d/0x3e00 [ 25.159037] ? __lock_acquire+0x664/0x3e00 [ 25.159040] ? lock_downgrade+0x980/0x980 [ 25.159044] ? lock_downgrade+0x980/0x980 [ 25.159050] ? remove_wait_queue+0x81/0x350 [ 25.159056] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.159060] ? __lock_acquire+0x664/0x3e00 [ 25.159064] ? check_noncircular+0x20/0x20 [ 25.159072] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.159076] ? lock_acquire+0x1d5/0x580 [ 25.159080] ? lock_acquire+0x1d5/0x580 [ 25.159086] ? ep_free+0xf4/0x320 [ 25.159091] ? lock_release+0xa40/0xa40 [ 25.159097] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.159100] ? print_irqtrace_events+0x270/0x270 [ 25.159106] ? rcu_note_context_switch+0x710/0x710 [ 25.159111] ? __might_sleep+0x95/0x190 [ 25.159115] ? ep_free+0xf4/0x320 [ 25.159122] ? __mutex_lock+0x16f/0x1a80 [ 25.159125] ? ep_free+0xf4/0x320 [ 25.159129] ? print_irqtrace_events+0x270/0x270 [ 25.159132] ? ep_free+0xf4/0x320 [ 25.159137] lock_acquire+0x1d5/0x580 [ 25.159140] ? lock_acquire+0x1d5/0x580 [ 25.159144] ? remove_wait_queue+0x81/0x350 [ 25.159148] ? __lock_acquire+0x664/0x3e00 [ 25.159152] ? lock_release+0xa40/0xa40 [ 25.159158] ? lock_acquire+0x1d5/0x580 [ 25.159161] ? lock_acquire+0x1d5/0x580 [ 25.159165] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.159170] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.159174] ? remove_wait_queue+0x81/0x350 [ 25.159178] remove_wait_queue+0x81/0x350 [ 25.159182] ? add_wait_queue+0x290/0x290 [ 25.159186] ? rcutorture_record_progress+0x10/0x10 [ 25.159192] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.159200] ? __kernel_text_address+0xd/0x40 [ 25.159205] ? clear_tfile_check_list+0x370/0x370 [ 25.159209] ? check_noncircular+0x20/0x20 [ 25.159215] ? locks_remove_file+0x3fa/0x5a0 [ 25.159221] ep_free+0x13f/0x320 [ 25.159225] ? ep_remove+0x800/0x800 [ 25.159229] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.159234] ? ep_free+0x320/0x320 [ 25.159237] ep_eventpoll_release+0x44/0x60 [ 25.159243] __fput+0x327/0x7e0 [ 25.159248] ? fput+0x140/0x140 [ 25.159252] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.159258] ____fput+0x15/0x20 [ 25.159262] task_work_run+0x199/0x270 [ 25.159267] ? task_work_cancel+0x210/0x210 [ 25.159270] ? _raw_spin_unlock+0x22/0x30 [ 25.159274] ? switch_task_namespaces+0x87/0xc0 [ 25.159281] do_exit+0x9bb/0x1ad0 [ 25.159287] ? binder_ioctl+0x491/0x1417 [ 25.159291] ? mm_update_next_owner+0x930/0x930 [ 25.159296] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.159304] ? avc_ss_reset+0x110/0x110 [ 25.159307] ? mutex_unlock+0xd/0x10 [ 25.159311] ? SyS_epoll_ctl+0x30a/0x1a80 [ 25.159323] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.159326] ? up_read+0x1a/0x40 [ 25.159331] ? rcu_note_context_switch+0x710/0x710 [ 25.159335] ? __fd_install+0x288/0x740 [ 25.159340] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.159344] ? do_vfs_ioctl+0x486/0x1520 [ 25.159347] ? _cond_resched+0x14/0x30 [ 25.159352] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.159358] ? selinux_capable+0x40/0x40 [ 25.159362] ? __alloc_fd+0x750/0x750 [ 25.159367] do_group_exit+0x149/0x400 [ 25.159371] ? SyS_exit+0x30/0x30 [ 25.159375] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.159381] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.159386] SyS_exit_group+0x1d/0x20 [ 25.159390] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 25.159393] RIP: 0033:0x4429f8 [ 25.159395] RSP: 002b:00007ffdaf52f378 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.159400] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.159402] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.159404] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.159406] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.159408] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.159414] [ 25.159416] Allocated by task 3149: [ 25.159420] save_stack+0x43/0xd0 [ 25.159423] kasan_kmalloc+0xad/0xe0 [ 25.159426] kmem_cache_alloc_trace+0x136/0x750 [ 25.159429] binder_get_thread+0x1cf/0x870 [ 25.159432] binder_poll+0x8c/0x390 [ 25.159435] ep_item_poll.isra.10+0xf2/0x320 [ 25.159438] ep_insert+0x6a2/0x1ac0 [ 25.159441] SyS_epoll_ctl+0x12bf/0x1a80 [ 25.159444] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 25.159445] [ 25.159446] Freed by task 3149: [ 25.159449] save_stack+0x43/0xd0 [ 25.159452] kasan_slab_free+0x71/0xc0 [ 25.159454] kfree+0xd6/0x260 [ 25.159457] binder_thread_dec_tmpref+0x27f/0x310 [ 25.159460] binder_thread_release+0x27d/0x540 [ 25.159462] binder_ioctl+0xc02/0x1417 [ 25.159465] do_vfs_ioctl+0x1b1/0x1520 [ 25.159467] SyS_ioctl+0x8f/0xc0 [ 25.159470] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 25.159471] [ 25.159474] The buggy address belongs to the object at ffff8801cb2a2280 [ 25.159474] which belongs to the cache kmalloc-512 of size 512 [ 25.159477] The buggy address is located 184 bytes inside of [ 25.159477] 512-byte region [ffff8801cb2a2280, ffff8801cb2a2480) [ 25.159478] The buggy address belongs to the page: [ 25.159482] page:000000000fd6bb94 count:1 mapcount:0 mapping:0000000030851413 index:0x0 [ 25.159486] flags: 0x2fffc0000000100(slab) [ 25.159492] raw: 02fffc0000000100 ffff8801cb2a2000 0000000000000000 0000000100000006 [ 25.159496] raw: ffffea00072c0120 ffffea00072c9de0 ffff8801dac00940 0000000000000000 [ 25.159498] page dumped because: kasan: bad access detected [ 25.159498] [ 25.159499] Memory state around the buggy address: [ 25.159502] ffff8801cb2a2200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.159505] ffff8801cb2a2280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.159508] >ffff8801cb2a2300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.159509] ^ [ 25.159512] ffff8801cb2a2380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.159514] ffff8801cb2a2400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.159515] ================================================================== [ 25.159517] Disabling lock debugging due to kernel taint [ 25.159520] Kernel panic - not syncing: panic_on_warn set ... [ 25.159520] [ 25.159524] CPU: 1 PID: 3149 Comm: syzkaller181359 Tainted: G B 4.15.0-rc4-next-20171221+ #78 [ 25.159526] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.159527] Call Trace: [ 25.159530] dump_stack+0x194/0x257 [ 25.159534] ? arch_local_irq_restore+0x53/0x53 [ 25.159538] ? kasan_end_report+0x32/0x50 [ 25.159541] ? lock_downgrade+0x980/0x980 [ 25.159545] ? vsnprintf+0x1ed/0x1900 [ 25.159549] ? __lock_acquire+0x3d30/0x3e00 [ 25.159552] panic+0x1e4/0x41c [ 25.159556] ? refcount_error_report+0x214/0x214 [ 25.159560] ? add_taint+0x40/0x50 [ 25.159563] ? add_taint+0x1c/0x50 [ 25.159567] ? __lock_acquire+0x3d4d/0x3e00 [ 25.159571] kasan_end_report+0x50/0x50 [ 25.159574] kasan_report+0x144/0x340 [ 25.159579] __asan_report_load8_noabort+0x14/0x20 [ 25.159582] __lock_acquire+0x3d4d/0x3e00 [ 25.159586] ? __lock_acquire+0x664/0x3e00 [ 25.159589] ? lock_downgrade+0x980/0x980 [ 25.159592] ? lock_downgrade+0x980/0x980 [ 25.159597] ? remove_wait_queue+0x81/0x350 [ 25.159602] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.159606] ? __lock_acquire+0x664/0x3e00 [ 25.159609] ? check_noncircular+0x20/0x20 [ 25.159616] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.159620] ? lock_acquire+0x1d5/0x580 [ 25.159623] ? lock_acquire+0x1d5/0x580 [ 25.159626] ? ep_free+0xf4/0x320 [ 25.159631] ? lock_release+0xa40/0xa40 [ 25.159635] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.159638] ? print_irqtrace_events+0x270/0x270 [ 25.159642] ? rcu_note_context_switch+0x710/0x710 [ 25.159646] ? __might_sleep+0x95/0x190 [ 25.159650] ? ep_free+0xf4/0x320 [ 25.159654] ? __mutex_lock+0x16f/0x1a80 [ 25.159656] ? ep_free+0xf4/0x320 [ 25.159661] ? print_irqtrace_events+0x270/0x270 [ 25.159663] ? ep_free+0xf4/0x320 [ 25.159668] lock_acquire+0x1d5/0x580 [ 25.159671] ? lock_acquire+0x1d5/0x580 [ 25.159675] ? remove_wait_queue+0x81/0x350 [ 25.159678] ? __lock_acquire+0x664/0x3e00 [ 25.159683] ? lock_release+0xa40/0xa40 [ 25.159688] ? lock_acquire+0x1d5/0x580 [ 25.159691] ? lock_acquire+0x1d5/0x580 [ 25.159694] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.159699] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.159702] ? remove_wait_queue+0x81/0x350 [ 25.159709] remove_wait_queue+0x81/0x350 [ 25.159714] ? add_wait_queue+0x290/0x290 [ 25.159718] ? rcutorture_record_progress+0x10/0x10 [ 25.159724] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.159728] ? __kernel_text_address+0xd/0x40 [ 25.159732] ? clear_tfile_check_list+0x370/0x370 [ 25.159737] ? check_noncircular+0x20/0x20 [ 25.159742] ? locks_remove_file+0x3fa/0x5a0 [ 25.159747] ep_free+0x13f/0x320 [ 25.159750] ? ep_remove+0x800/0x800 [ 25.159754] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.159758] ? ep_free+0x320/0x320 [ 25.159761] ep_eventpoll_release+0x44/0x60 [ 25.159765] __fput+0x327/0x7e0 [ 25.159770] ? fput+0x140/0x140 [ 25.159773] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.159778] ____fput+0x15/0x20 [ 25.159782] task_work_run+0x199/0x270 [ 25.159787] ? task_work_cancel+0x210/0x210 [ 25.159790] ? _raw_spin_unlock+0x22/0x30 [ 25.159794] ? switch_task_namespaces+0x87/0xc0 [ 25.159798] do_exit+0x9bb/0x1ad0 [ 25.159802] ? binder_ioctl+0x491/0x1417 [ 25.159806] ? mm_update_next_owner+0x930/0x930 [ 25.159810] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.159815] ? avc_ss_reset+0x110/0x110 [ 25.159819] ? mutex_unlock+0xd/0x10 [ 25.159822] ? SyS_epoll_ctl+0x30a/0x1a80 [ 25.159833] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.159836] ? up_read+0x1a/0x40 [ 25.159840] ? rcu_note_context_switch+0x710/0x710 [ 25.159843] ? __fd_install+0x288/0x740 [ 25.159848] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.159851] ? do_vfs_ioctl+0x486/0x1520 [ 25.159854] ? _cond_resched+0x14/0x30 [ 25.159859] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.159863] ? selinux_capable+0x40/0x40 [ 25.159867] ? __alloc_fd+0x750/0x750 [ 25.159872] do_group_exit+0x149/0x400 [ 25.159876] ? SyS_exit+0x30/0x30 [ 25.159880] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.159884] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.159888] SyS_exit_group+0x1d/0x20 [ 25.159892] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 25.159894] RIP: 0033:0x4429f8 [ 25.159896] RSP: 002b:00007ffdaf52f378 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.159900] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.159902] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.159904] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.159906] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.159908] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.181718] Dumping ftrace buffer: [ 25.181722] (ftrace buffer empty) [ 25.181724] Kernel Offset: disabled [ 26.320535] Rebooting in 86400 seconds..