[....] Starting enhanced syslogd: rsyslogd[ 12.734332] audit: type=1400 audit(1515500377.202:5): avc: denied { syslog } for pid=3348 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?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. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 19.346674] audit: type=1400 audit(1515500383.814:6): avc: denied { map } for pid=3486 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 Warning: Permanently added '10.128.0.8' (ECDSA) to the list of known hosts. executing program [ 25.567833] audit: type=1400 audit(1515500390.035:7): avc: denied { map } for pid=3500 comm="syzkaller661528" path="/root/syzkaller661528740" 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.573152] ================================================================== [ 25.573167] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 25.573172] Read of size 8 at addr ffff8801c7c8f5b8 by task syzkaller661528/3500 [ 25.573174] [ 25.573180] CPU: 0 PID: 3500 Comm: syzkaller661528 Not tainted 4.15.0-rc6-mm1+ #52 [ 25.573184] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.573186] Call Trace: [ 25.573195] dump_stack+0x194/0x257 [ 25.573203] ? arch_local_irq_restore+0x53/0x53 [ 25.573212] ? show_regs_print_info+0x18/0x18 [ 25.573218] ? __lock_acquire+0x664/0x3e00 [ 25.573226] ? __lock_acquire+0x3d4d/0x3e00 [ 25.573235] print_address_description+0x73/0x250 [ 25.573241] ? __lock_acquire+0x3d4d/0x3e00 [ 25.573247] kasan_report+0x23b/0x360 [ 25.573256] __asan_report_load8_noabort+0x14/0x20 [ 25.573262] __lock_acquire+0x3d4d/0x3e00 [ 25.573268] ? lock_downgrade+0x980/0x980 [ 25.573277] ? remove_wait_queue+0x81/0x350 [ 25.573287] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.573293] ? __lock_acquire+0x664/0x3e00 [ 25.573299] ? check_noncircular+0x20/0x20 [ 25.573311] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.573318] ? lock_acquire+0x1d5/0x580 [ 25.573324] ? lock_acquire+0x1d5/0x580 [ 25.573330] ? ep_free+0xf4/0x320 [ 25.573337] ? check_noncircular+0x20/0x20 [ 25.573343] ? lock_release+0xa40/0xa40 [ 25.573350] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.573357] ? print_irqtrace_events+0x270/0x270 [ 25.573365] ? rcu_note_context_switch+0x710/0x710 [ 25.573378] ? __might_sleep+0x95/0x190 [ 25.573383] ? ep_free+0xf4/0x320 [ 25.573390] ? __mutex_lock+0x16f/0x1a80 [ 25.573394] ? ep_free+0xf4/0x320 [ 25.573401] ? print_irqtrace_events+0x270/0x270 [ 25.573406] ? ep_free+0xf4/0x320 [ 25.573414] lock_acquire+0x1d5/0x580 [ 25.573419] ? lock_acquire+0x1d5/0x580 [ 25.573425] ? remove_wait_queue+0x81/0x350 [ 25.573431] ? __lock_acquire+0x664/0x3e00 [ 25.573439] ? lock_release+0xa40/0xa40 [ 25.573448] ? lock_acquire+0x1d5/0x580 [ 25.573453] ? lock_acquire+0x1d5/0x580 [ 25.573459] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.573466] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.573472] ? remove_wait_queue+0x81/0x350 [ 25.573478] remove_wait_queue+0x81/0x350 [ 25.573486] ? rcutorture_record_progress+0x10/0x10 [ 25.573492] ? add_wait_queue+0x290/0x290 [ 25.573497] ? rcutorture_record_progress+0x10/0x10 [ 25.573507] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.573515] ? unwind_get_return_address+0x61/0xa0 [ 25.573522] ? clear_tfile_check_list+0x370/0x370 [ 25.573530] ? check_noncircular+0x20/0x20 [ 25.573538] ? locks_remove_file+0x3fa/0x5a0 [ 25.573547] ep_free+0x13f/0x320 [ 25.573553] ? ep_remove+0x800/0x800 [ 25.573560] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.573567] ? ep_free+0x320/0x320 [ 25.573572] ep_eventpoll_release+0x44/0x60 [ 25.573579] __fput+0x327/0x7e0 [ 25.573587] ? fput+0x140/0x140 [ 25.573593] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.573601] ____fput+0x15/0x20 [ 25.573607] task_work_run+0x199/0x270 [ 25.573614] ? task_work_cancel+0x210/0x210 [ 25.573620] ? _raw_spin_unlock+0x22/0x30 [ 25.573627] ? switch_task_namespaces+0x87/0xc0 [ 25.573636] do_exit+0x9bb/0x1ad0 [ 25.573645] ? binder_ioctl+0x481/0x1417 [ 25.573651] ? mm_update_next_owner+0x930/0x930 [ 25.573659] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.573669] ? avc_ss_reset+0x110/0x110 [ 25.573675] ? mutex_unlock+0xd/0x10 [ 25.573680] ? SyS_epoll_ctl+0x30a/0x1a80 [ 25.573700] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.573705] ? up_read+0x1a/0x40 [ 25.573711] ? rcu_note_context_switch+0x710/0x710 [ 25.573717] ? __fd_install+0x288/0x740 [ 25.573726] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.573732] ? do_vfs_ioctl+0x486/0x1520 [ 25.573737] ? _cond_resched+0x14/0x30 [ 25.573745] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.573752] ? selinux_capable+0x40/0x40 [ 25.573759] ? __alloc_fd+0x750/0x750 [ 25.573768] do_group_exit+0x149/0x400 [ 25.573774] ? SyS_exit+0x30/0x30 [ 25.573781] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.573789] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.573797] SyS_exit_group+0x1d/0x20 [ 25.573803] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.573807] RIP: 0033:0x4429f8 [ 25.573811] RSP: 002b:00007ffe6a398198 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.573817] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.573820] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.573824] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.573827] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.573830] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.573839] [ 25.573841] Allocated by task 3500: [ 25.573848] save_stack+0x43/0xd0 [ 25.573853] kasan_kmalloc+0xad/0xe0 [ 25.573858] kmem_cache_alloc_trace+0x136/0x750 [ 25.573863] binder_get_thread+0x1cf/0x870 [ 25.573867] binder_poll+0x8c/0x390 [ 25.573871] ep_item_poll.isra.10+0xf2/0x320 [ 25.573875] ep_insert+0x6a2/0x1ac0 [ 25.573879] SyS_epoll_ctl+0x12bf/0x1a80 [ 25.573884] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.573885] [ 25.573887] Freed by task 3500: [ 25.573892] save_stack+0x43/0xd0 [ 25.573897] __kasan_slab_free+0x11a/0x170 [ 25.573902] kasan_slab_free+0xe/0x10 [ 25.573907] kfree+0xd9/0x260 [ 25.573912] binder_thread_dec_tmpref+0x27f/0x310 [ 25.573916] binder_thread_release+0x27d/0x540 [ 25.573921] binder_ioctl+0xc02/0x1417 [ 25.573926] do_vfs_ioctl+0x1b1/0x1520 [ 25.573930] SyS_ioctl+0x8f/0xc0 [ 25.573935] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.573936] [ 25.573940] The buggy address belongs to the object at ffff8801c7c8f500 [ 25.573940] which belongs to the cache kmalloc-512 of size 512 [ 25.573945] The buggy address is located 184 bytes inside of [ 25.573945] 512-byte region [ffff8801c7c8f500, ffff8801c7c8f700) [ 25.573947] The buggy address belongs to the page: [ 25.573952] page:ffffea00071f23c0 count:1 mapcount:0 mapping:ffff8801c7c8f000 index:0xffff8801c7c8fa00 [ 25.573957] flags: 0x2fffc0000000100(slab) [ 25.573966] raw: 02fffc0000000100 ffff8801c7c8f000 ffff8801c7c8fa00 0000000100000004 [ 25.573972] raw: ffffea000721db20 ffff8801dac01738 ffff8801dac00940 0000000000000000 [ 25.573975] page dumped because: kasan: bad access detected [ 25.573976] [ 25.573977] Memory state around the buggy address: [ 25.573982] ffff8801c7c8f480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.573986] ffff8801c7c8f500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.573990] >ffff8801c7c8f580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.573992] ^ [ 25.573997] ffff8801c7c8f600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.574004] ffff8801c7c8f680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.574006] ================================================================== [ 25.574008] Disabling lock debugging due to kernel taint [ 25.574011] Kernel panic - not syncing: panic_on_warn set ... [ 25.574011] [ 25.574017] CPU: 0 PID: 3500 Comm: syzkaller661528 Tainted: G B 4.15.0-rc6-mm1+ #52 [ 25.574020] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.574021] Call Trace: [ 25.574028] dump_stack+0x194/0x257 [ 25.574036] ? arch_local_irq_restore+0x53/0x53 [ 25.574041] ? kasan_end_report+0x32/0x50 [ 25.574048] ? lock_downgrade+0x980/0x980 [ 25.574053] ? vsnprintf+0x1ed/0x1900 [ 25.574060] ? __lock_acquire+0x3c50/0x3e00 [ 25.574065] panic+0x1e4/0x41c [ 25.574071] ? refcount_error_report+0x214/0x214 [ 25.574078] ? add_taint+0x40/0x50 [ 25.574083] ? add_taint+0x1c/0x50 [ 25.574090] ? __lock_acquire+0x3d4d/0x3e00 [ 25.574097] kasan_end_report+0x50/0x50 [ 25.574103] kasan_report+0x148/0x360 [ 25.574111] __asan_report_load8_noabort+0x14/0x20 [ 25.574117] __lock_acquire+0x3d4d/0x3e00 [ 25.574124] ? lock_downgrade+0x980/0x980 [ 25.574131] ? remove_wait_queue+0x81/0x350 [ 25.574140] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.574147] ? __lock_acquire+0x664/0x3e00 [ 25.574152] ? check_noncircular+0x20/0x20 [ 25.574164] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.574171] ? lock_acquire+0x1d5/0x580 [ 25.574177] ? lock_acquire+0x1d5/0x580 [ 25.574181] ? ep_free+0xf4/0x320 [ 25.574188] ? check_noncircular+0x20/0x20 [ 25.574195] ? lock_release+0xa40/0xa40 [ 25.574201] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.574207] ? print_irqtrace_events+0x270/0x270 [ 25.574214] ? rcu_note_context_switch+0x710/0x710 [ 25.574221] ? __might_sleep+0x95/0x190 [ 25.574226] ? ep_free+0xf4/0x320 [ 25.574232] ? __mutex_lock+0x16f/0x1a80 [ 25.574236] ? ep_free+0xf4/0x320 [ 25.574243] ? print_irqtrace_events+0x270/0x270 [ 25.574248] ? ep_free+0xf4/0x320 [ 25.574256] lock_acquire+0x1d5/0x580 [ 25.574261] ? lock_acquire+0x1d5/0x580 [ 25.574267] ? remove_wait_queue+0x81/0x350 [ 25.574273] ? __lock_acquire+0x664/0x3e00 [ 25.574280] ? lock_release+0xa40/0xa40 [ 25.574290] ? lock_acquire+0x1d5/0x580 [ 25.574295] ? lock_acquire+0x1d5/0x580 [ 25.574300] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.574307] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.574313] ? remove_wait_queue+0x81/0x350 [ 25.574319] remove_wait_queue+0x81/0x350 [ 25.574326] ? rcutorture_record_progress+0x10/0x10 [ 25.574333] ? add_wait_queue+0x290/0x290 [ 25.574339] ? rcutorture_record_progress+0x10/0x10 [ 25.574348] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.574354] ? unwind_get_return_address+0x61/0xa0 [ 25.574361] ? clear_tfile_check_list+0x370/0x370 [ 25.574373] ? check_noncircular+0x20/0x20 [ 25.574381] ? locks_remove_file+0x3fa/0x5a0 [ 25.574389] ep_free+0x13f/0x320 [ 25.574395] ? ep_remove+0x800/0x800 [ 25.574401] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.574407] ? ep_free+0x320/0x320 [ 25.574413] ep_eventpoll_release+0x44/0x60 [ 25.574418] __fput+0x327/0x7e0 [ 25.574426] ? fput+0x140/0x140 [ 25.574431] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.574439] ____fput+0x15/0x20 [ 25.574444] task_work_run+0x199/0x270 [ 25.574451] ? task_work_cancel+0x210/0x210 [ 25.574457] ? _raw_spin_unlock+0x22/0x30 [ 25.574463] ? switch_task_namespaces+0x87/0xc0 [ 25.574471] do_exit+0x9bb/0x1ad0 [ 25.574478] ? binder_ioctl+0x481/0x1417 [ 25.574484] ? mm_update_next_owner+0x930/0x930 [ 25.574492] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.574500] ? avc_ss_reset+0x110/0x110 [ 25.574506] ? mutex_unlock+0xd/0x10 [ 25.574511] ? SyS_epoll_ctl+0x30a/0x1a80 [ 25.574529] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.574534] ? up_read+0x1a/0x40 [ 25.574541] ? rcu_note_context_switch+0x710/0x710 [ 25.574546] ? __fd_install+0x288/0x740 [ 25.574555] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.574561] ? do_vfs_ioctl+0x486/0x1520 [ 25.574566] ? _cond_resched+0x14/0x30 [ 25.574574] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.574580] ? selinux_capable+0x40/0x40 [ 25.574587] ? __alloc_fd+0x750/0x750 [ 25.574595] do_group_exit+0x149/0x400 [ 25.574602] ? SyS_exit+0x30/0x30 [ 25.574609] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.574615] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.574623] SyS_exit_group+0x1d/0x20 [ 25.574628] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.574632] RIP: 0033:0x4429f8 [ 25.574635] RSP: 002b:00007ffe6a398198 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.574641] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.574644] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.574647] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.574651] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.574654] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.594429] Dumping ftrace buffer: [ 25.594432] (ftrace buffer empty) [ 25.594434] Kernel Offset: disabled [ 26.728002] Rebooting in 86400 seconds..