[....] Starting enhanced syslogd: rsyslogd[ 12.174937] audit: type=1400 audit(1514789311.876:5): avc: denied { syslog } for pid=3338 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 file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 18.242577] audit: type=1400 audit(1514789317.944:6): avc: denied { map } for pid=3480 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.15.243' (ECDSA) to the list of known hosts. executing program [ 32.505597] audit: type=1400 audit(1514789332.207:7): avc: denied { map } for pid=3496 comm="syzkaller113480" path="/root/syzkaller113480602" 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 [ 32.509239] ================================================================== [ 32.509249] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 32.509253] Read of size 8 at addr ffff8801c845f8f0 by task syzkaller113480/3496 [ 32.509254] [ 32.509258] CPU: 0 PID: 3496 Comm: syzkaller113480 Not tainted 4.15.0-rc6+ #245 [ 32.509261] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.509262] Call Trace: [ 32.509269] dump_stack+0x194/0x257 [ 32.509274] ? arch_local_irq_restore+0x53/0x53 [ 32.509280] ? show_regs_print_info+0x18/0x18 [ 32.509284] ? print_irqtrace_events+0x270/0x270 [ 32.509288] ? __lock_acquire+0x664/0x3e00 [ 32.509292] ? __lock_acquire+0x3d4d/0x3e00 [ 32.509299] print_address_description+0x73/0x250 [ 32.509302] ? __lock_acquire+0x3d4d/0x3e00 [ 32.509306] kasan_report+0x25b/0x340 [ 32.509311] __asan_report_load8_noabort+0x14/0x20 [ 32.509315] __lock_acquire+0x3d4d/0x3e00 [ 32.509318] ? __lock_acquire+0x664/0x3e00 [ 32.509322] ? lock_downgrade+0x980/0x980 [ 32.509325] ? lock_downgrade+0x980/0x980 [ 32.509331] ? remove_wait_queue+0x81/0x350 [ 32.509337] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 32.509341] ? __lock_acquire+0x664/0x3e00 [ 32.509344] ? check_noncircular+0x20/0x20 [ 32.509351] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 32.509356] ? lock_acquire+0x1d5/0x580 [ 32.509359] ? lock_acquire+0x1d5/0x580 [ 32.509364] ? ep_free+0xf4/0x320 [ 32.509370] ? lock_release+0xa40/0xa40 [ 32.509374] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 32.509378] ? print_irqtrace_events+0x270/0x270 [ 32.509388] ? rcu_note_context_switch+0x710/0x710 [ 32.509393] ? __might_sleep+0x95/0x190 [ 32.509396] ? ep_free+0xf4/0x320 [ 32.509401] ? __mutex_lock+0x16f/0x1a80 [ 32.509404] ? ep_free+0xf4/0x320 [ 32.509408] ? print_irqtrace_events+0x270/0x270 [ 32.509411] ? ep_free+0xf4/0x320 [ 32.509416] lock_acquire+0x1d5/0x580 [ 32.509419] ? lock_acquire+0x1d5/0x580 [ 32.509423] ? remove_wait_queue+0x81/0x350 [ 32.509427] ? __lock_acquire+0x664/0x3e00 [ 32.509431] ? lock_release+0xa40/0xa40 [ 32.509437] ? lock_acquire+0x1d5/0x580 [ 32.509440] ? lock_acquire+0x1d5/0x580 [ 32.509444] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 32.509449] _raw_spin_lock_irqsave+0x96/0xc0 [ 32.509452] ? remove_wait_queue+0x81/0x350 [ 32.509456] remove_wait_queue+0x81/0x350 [ 32.509461] ? add_wait_queue+0x290/0x290 [ 32.509465] ? rcutorture_record_progress+0x10/0x10 [ 32.509471] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 32.509476] ? __kernel_text_address+0xd/0x40 [ 32.509481] ? clear_tfile_check_list+0x370/0x370 [ 32.509486] ? check_noncircular+0x20/0x20 [ 32.509493] ? locks_remove_file+0x3fa/0x5a0 [ 32.509498] ep_free+0x13f/0x320 [ 32.509502] ? ep_remove+0x800/0x800 [ 32.509506] ? fsnotify_first_mark+0x2b0/0x2b0 [ 32.509511] ? ep_free+0x320/0x320 [ 32.509514] ep_eventpoll_release+0x44/0x60 [ 32.509520] __fput+0x327/0x7e0 [ 32.509525] ? fput+0x140/0x140 [ 32.509529] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.509534] ____fput+0x15/0x20 [ 32.509538] task_work_run+0x199/0x270 [ 32.509543] ? task_work_cancel+0x210/0x210 [ 32.509547] ? _raw_spin_unlock+0x22/0x30 [ 32.509551] ? switch_task_namespaces+0x87/0xc0 [ 32.509558] do_exit+0x9bb/0x1ad0 [ 32.509565] ? binder_ioctl+0x551/0x1417 [ 32.509568] ? mm_update_next_owner+0x930/0x930 [ 32.509573] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 32.509580] ? avc_ss_reset+0x110/0x110 [ 32.509583] ? mutex_unlock+0xd/0x10 [ 32.509587] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 32.509599] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 32.509602] ? up_read+0x1a/0x40 [ 32.509606] ? rcu_note_context_switch+0x710/0x710 [ 32.509609] ? __fd_install+0x288/0x740 [ 32.509618] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 32.509622] ? do_vfs_ioctl+0x486/0x1520 [ 32.509625] ? _cond_resched+0x14/0x30 [ 32.509630] ? ioctl_preallocate+0x2b0/0x2b0 [ 32.509635] ? selinux_capable+0x40/0x40 [ 32.509639] ? __alloc_fd+0x750/0x750 [ 32.509645] do_group_exit+0x149/0x400 [ 32.509649] ? SyS_exit+0x30/0x30 [ 32.509653] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.509659] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.509664] SyS_exit_group+0x1d/0x20 [ 32.509668] entry_SYSCALL_64_fastpath+0x23/0x9a [ 32.509671] RIP: 0033:0x4429f8 [ 32.509673] RSP: 002b:00007ffd45406f38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 32.509677] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 32.509679] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 32.509681] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 32.509683] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 32.509686] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 32.509691] [ 32.509693] Allocated by task 3496: [ 32.509697] save_stack+0x43/0xd0 [ 32.509700] kasan_kmalloc+0xad/0xe0 [ 32.509703] kmem_cache_alloc_trace+0x136/0x750 [ 32.509706] binder_get_thread+0x1cf/0x870 [ 32.509708] binder_poll+0x8c/0x390 [ 32.509711] ep_item_poll.isra.10+0xec/0x320 [ 32.509714] ep_insert+0x6a3/0x1b10 [ 32.509717] SyS_epoll_ctl+0x12e4/0x1ab0 [ 32.509720] entry_SYSCALL_64_fastpath+0x23/0x9a [ 32.509721] [ 32.509722] Freed by task 3496: [ 32.509725] save_stack+0x43/0xd0 [ 32.509728] kasan_slab_free+0x71/0xc0 [ 32.509730] kfree+0xd6/0x260 [ 32.509733] binder_thread_dec_tmpref+0x27f/0x310 [ 32.509737] binder_thread_release+0x27d/0x540 [ 32.509739] binder_ioctl+0xc02/0x1417 [ 32.509742] do_vfs_ioctl+0x1b1/0x1520 [ 32.509745] SyS_ioctl+0x8f/0xc0 [ 32.509748] entry_SYSCALL_64_fastpath+0x23/0x9a [ 32.509748] [ 32.509751] The buggy address belongs to the object at ffff8801c845f840 [ 32.509751] which belongs to the cache kmalloc-512 of size 512 [ 32.509754] The buggy address is located 176 bytes inside of [ 32.509754] 512-byte region [ffff8801c845f840, ffff8801c845fa40) [ 32.509755] The buggy address belongs to the page: [ 32.509759] page:00000000fcd70dc4 count:1 mapcount:0 mapping:00000000377fceef index:0x0 [ 32.509763] flags: 0x2fffc0000000100(slab) [ 32.509768] raw: 02fffc0000000100 ffff8801c845f0c0 0000000000000000 0000000100000006 [ 32.509772] raw: ffffea0007398060 ffffea0007398120 ffff8801dac00940 0000000000000000 [ 32.509774] page dumped because: kasan: bad access detected [ 32.509775] [ 32.509776] Memory state around the buggy address: [ 32.509778] ffff8801c845f780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 32.509781] ffff8801c845f800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 32.509783] >ffff8801c845f880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.509785] ^ [ 32.509788] ffff8801c845f900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.509790] ffff8801c845f980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.509791] ================================================================== [ 32.509792] Disabling lock debugging due to kernel taint [ 32.509795] Kernel panic - not syncing: panic_on_warn set ... [ 32.509795] [ 32.509799] CPU: 0 PID: 3496 Comm: syzkaller113480 Tainted: G B 4.15.0-rc6+ #245 [ 32.509801] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.509802] Call Trace: [ 32.509806] dump_stack+0x194/0x257 [ 32.509810] ? arch_local_irq_restore+0x53/0x53 [ 32.509813] ? kasan_end_report+0x32/0x50 [ 32.509817] ? lock_downgrade+0x980/0x980 [ 32.509822] ? vsnprintf+0x1ed/0x1900 [ 32.509825] ? __lock_acquire+0x3c70/0x3e00 [ 32.509829] panic+0x1e4/0x41c [ 32.509832] ? refcount_error_report+0x214/0x214 [ 32.509836] ? add_taint+0x40/0x50 [ 32.509839] ? add_taint+0x1c/0x50 [ 32.509843] ? __lock_acquire+0x3d4d/0x3e00 [ 32.509847] kasan_end_report+0x50/0x50 [ 32.509850] kasan_report+0x144/0x340 [ 32.509855] __asan_report_load8_noabort+0x14/0x20 [ 32.509858] __lock_acquire+0x3d4d/0x3e00 [ 32.509861] ? __lock_acquire+0x664/0x3e00 [ 32.509865] ? lock_downgrade+0x980/0x980 [ 32.509868] ? lock_downgrade+0x980/0x980 [ 32.509872] ? remove_wait_queue+0x81/0x350 [ 32.509877] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 32.509881] ? __lock_acquire+0x664/0x3e00 [ 32.509884] ? check_noncircular+0x20/0x20 [ 32.509891] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 32.509895] ? lock_acquire+0x1d5/0x580 [ 32.509898] ? lock_acquire+0x1d5/0x580 [ 32.509901] ? ep_free+0xf4/0x320 [ 32.509906] ? lock_release+0xa40/0xa40 [ 32.509910] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 32.509913] ? print_irqtrace_events+0x270/0x270 [ 32.509917] ? rcu_note_context_switch+0x710/0x710 [ 32.509921] ? __might_sleep+0x95/0x190 [ 32.509925] ? ep_free+0xf4/0x320 [ 32.509928] ? __mutex_lock+0x16f/0x1a80 [ 32.509931] ? ep_free+0xf4/0x320 [ 32.509935] ? print_irqtrace_events+0x270/0x270 [ 32.509938] ? ep_free+0xf4/0x320 [ 32.509943] lock_acquire+0x1d5/0x580 [ 32.509946] ? lock_acquire+0x1d5/0x580 [ 32.509949] ? remove_wait_queue+0x81/0x350 [ 32.509953] ? __lock_acquire+0x664/0x3e00 [ 32.509957] ? lock_release+0xa40/0xa40 [ 32.509962] ? lock_acquire+0x1d5/0x580 [ 32.509965] ? lock_acquire+0x1d5/0x580 [ 32.509969] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 32.509973] _raw_spin_lock_irqsave+0x96/0xc0 [ 32.509977] ? remove_wait_queue+0x81/0x350 [ 32.509981] remove_wait_queue+0x81/0x350 [ 32.509985] ? add_wait_queue+0x290/0x290 [ 32.509989] ? rcutorture_record_progress+0x10/0x10 [ 32.509994] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 32.509998] ? __kernel_text_address+0xd/0x40 [ 32.510006] ? clear_tfile_check_list+0x370/0x370 [ 32.510010] ? check_noncircular+0x20/0x20 [ 32.510015] ? locks_remove_file+0x3fa/0x5a0 [ 32.510020] ep_free+0x13f/0x320 [ 32.510024] ? ep_remove+0x800/0x800 [ 32.510027] ? fsnotify_first_mark+0x2b0/0x2b0 [ 32.510031] ? ep_free+0x320/0x320 [ 32.510035] ep_eventpoll_release+0x44/0x60 [ 32.510039] __fput+0x327/0x7e0 [ 32.510043] ? fput+0x140/0x140 [ 32.510047] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.510052] ____fput+0x15/0x20 [ 32.510056] task_work_run+0x199/0x270 [ 32.510060] ? task_work_cancel+0x210/0x210 [ 32.510064] ? _raw_spin_unlock+0x22/0x30 [ 32.510067] ? switch_task_namespaces+0x87/0xc0 [ 32.510072] do_exit+0x9bb/0x1ad0 [ 32.510076] ? binder_ioctl+0x551/0x1417 [ 32.510080] ? mm_update_next_owner+0x930/0x930 [ 32.510084] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 32.510089] ? avc_ss_reset+0x110/0x110 [ 32.510092] ? mutex_unlock+0xd/0x10 [ 32.510095] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 32.510105] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 32.510108] ? up_read+0x1a/0x40 [ 32.510112] ? rcu_note_context_switch+0x710/0x710 [ 32.510115] ? __fd_install+0x288/0x740 [ 32.510120] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 32.510126] ? do_vfs_ioctl+0x486/0x1520 [ 32.510129] ? _cond_resched+0x14/0x30 [ 32.510134] ? ioctl_preallocate+0x2b0/0x2b0 [ 32.510138] ? selinux_capable+0x40/0x40 [ 32.510142] ? __alloc_fd+0x750/0x750 [ 32.510146] do_group_exit+0x149/0x400 [ 32.510150] ? SyS_exit+0x30/0x30 [ 32.510154] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.510158] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.510162] SyS_exit_group+0x1d/0x20 [ 32.510166] entry_SYSCALL_64_fastpath+0x23/0x9a [ 32.510168] RIP: 0033:0x4429f8 [ 32.510170] RSP: 002b:00007ffd45406f38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 32.510174] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 32.510175] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 32.510177] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 32.510179] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 32.510181] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 32.531811] Dumping ftrace buffer: [ 32.531814] (ftrace buffer empty) [ 32.531816] Kernel Offset: disabled [ 33.655963] Rebooting in 86400 seconds..