[....] Starting enhanced syslogd: rsyslogd[ 11.149424] audit: type=1400 audit(1514382137.631:5): avc: denied { syslog } for pid=2994 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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: [ 16.005325] audit: type=1400 audit(1514382142.487:6): avc: denied { map } for pid=3133 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.34' (ECDSA) to the list of known hosts. executing program [ 22.170705] audit: type=1400 audit(1514382148.652:7): avc: denied { map } for pid=3147 comm="syzkaller138471" path="/root/syzkaller138471323" 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 [ 22.175145] ================================================================== [ 22.175159] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 22.175164] Read of size 8 at addr ffff8801c932c870 by task syzkaller138471/3147 [ 22.175165] [ 22.175173] CPU: 1 PID: 3147 Comm: syzkaller138471 Not tainted 4.15.0-rc5+ #238 [ 22.175176] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.175178] Call Trace: [ 22.175187] dump_stack+0x194/0x257 [ 22.175195] ? arch_local_irq_restore+0x53/0x53 [ 22.175203] ? show_regs_print_info+0x18/0x18 [ 22.175208] ? print_irqtrace_events+0x270/0x270 [ 22.175215] ? __lock_acquire+0x664/0x3e00 [ 22.175222] ? __lock_acquire+0x3d4d/0x3e00 [ 22.175230] print_address_description+0x73/0x250 [ 22.175236] ? __lock_acquire+0x3d4d/0x3e00 [ 22.175242] kasan_report+0x25b/0x340 [ 22.175250] __asan_report_load8_noabort+0x14/0x20 [ 22.175256] __lock_acquire+0x3d4d/0x3e00 [ 22.175262] ? __lock_acquire+0x664/0x3e00 [ 22.175267] ? lock_downgrade+0x980/0x980 [ 22.175272] ? lock_downgrade+0x980/0x980 [ 22.175280] ? remove_wait_queue+0x81/0x350 [ 22.175289] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.175296] ? __lock_acquire+0x664/0x3e00 [ 22.175301] ? check_noncircular+0x20/0x20 [ 22.175314] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.175321] ? lock_acquire+0x1d5/0x580 [ 22.175326] ? lock_acquire+0x1d5/0x580 [ 22.175332] ? ep_free+0xf4/0x320 [ 22.175341] ? lock_release+0xa40/0xa40 [ 22.175348] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.175354] ? print_irqtrace_events+0x270/0x270 [ 22.175362] ? rcu_note_context_switch+0x710/0x710 [ 22.175369] ? __might_sleep+0x95/0x190 [ 22.175374] ? ep_free+0xf4/0x320 [ 22.175380] ? __mutex_lock+0x16f/0x1a80 [ 22.175385] ? ep_free+0xf4/0x320 [ 22.175392] ? print_irqtrace_events+0x270/0x270 [ 22.175396] ? ep_free+0xf4/0x320 [ 22.175404] lock_acquire+0x1d5/0x580 [ 22.175409] ? lock_acquire+0x1d5/0x580 [ 22.175415] ? remove_wait_queue+0x81/0x350 [ 22.175421] ? __lock_acquire+0x664/0x3e00 [ 22.175428] ? lock_release+0xa40/0xa40 [ 22.175437] ? lock_acquire+0x1d5/0x580 [ 22.175442] ? lock_acquire+0x1d5/0x580 [ 22.175448] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.175455] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.175460] ? remove_wait_queue+0x81/0x350 [ 22.175467] remove_wait_queue+0x81/0x350 [ 22.175475] ? add_wait_queue+0x290/0x290 [ 22.175481] ? rcutorture_record_progress+0x10/0x10 [ 22.175490] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.175497] ? __kernel_text_address+0xd/0x40 [ 22.175505] ? clear_tfile_check_list+0x370/0x370 [ 22.175512] ? check_noncircular+0x20/0x20 [ 22.175520] ? locks_remove_file+0x3fa/0x5a0 [ 22.175529] ep_free+0x13f/0x320 [ 22.175534] ? ep_remove+0x800/0x800 [ 22.175541] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.175548] ? ep_free+0x320/0x320 [ 22.175554] ep_eventpoll_release+0x44/0x60 [ 22.175559] __fput+0x327/0x7e0 [ 22.175568] ? fput+0x140/0x140 [ 22.175574] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.175582] ____fput+0x15/0x20 [ 22.175588] task_work_run+0x199/0x270 [ 22.175596] ? task_work_cancel+0x210/0x210 [ 22.175601] ? _raw_spin_unlock+0x22/0x30 [ 22.175607] ? switch_task_namespaces+0x87/0xc0 [ 22.175616] do_exit+0x9bb/0x1ad0 [ 22.175624] ? binder_ioctl+0x4a1/0x1417 [ 22.175630] ? mm_update_next_owner+0x930/0x930 [ 22.175638] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.175648] ? avc_ss_reset+0x110/0x110 [ 22.175653] ? mutex_unlock+0xd/0x10 [ 22.175658] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 22.175677] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.175682] ? up_read+0x1a/0x40 [ 22.175688] ? rcu_note_context_switch+0x710/0x710 [ 22.175694] ? __fd_install+0x288/0x740 [ 22.175704] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.175710] ? do_vfs_ioctl+0x486/0x1520 [ 22.175717] ? _cond_resched+0x14/0x30 [ 22.175725] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.175732] ? selinux_capable+0x40/0x40 [ 22.175739] ? __alloc_fd+0x750/0x750 [ 22.175747] do_group_exit+0x149/0x400 [ 22.175754] ? SyS_exit+0x30/0x30 [ 22.175760] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.175768] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.175775] SyS_exit_group+0x1d/0x20 [ 22.175782] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.175786] RIP: 0033:0x4429f8 [ 22.175789] RSP: 002b:00007fff7b42f258 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.175796] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.175799] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.175803] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.175806] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.175809] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.175817] [ 22.175820] Allocated by task 3147: [ 22.175826] save_stack+0x43/0xd0 [ 22.175830] kasan_kmalloc+0xad/0xe0 [ 22.175838] kmem_cache_alloc_trace+0x136/0x750 [ 22.175843] binder_get_thread+0x1cf/0x870 [ 22.175847] binder_poll+0x8c/0x390 [ 22.175852] ep_item_poll.isra.10+0xec/0x320 [ 22.175856] ep_insert+0x6a3/0x1b10 [ 22.175860] SyS_epoll_ctl+0x12e4/0x1ab0 [ 22.175865] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.175866] [ 22.175869] Freed by task 3147: [ 22.175873] save_stack+0x43/0xd0 [ 22.175877] kasan_slab_free+0x71/0xc0 [ 22.175881] kfree+0xd6/0x260 [ 22.175886] binder_thread_dec_tmpref+0x27f/0x310 [ 22.175890] binder_thread_release+0x27d/0x540 [ 22.175895] binder_ioctl+0xc02/0x1417 [ 22.175900] do_vfs_ioctl+0x1b1/0x1520 [ 22.175905] SyS_ioctl+0x8f/0xc0 [ 22.175910] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.175911] [ 22.175916] The buggy address belongs to the object at ffff8801c932c7c0 [ 22.175916] which belongs to the cache kmalloc-512 of size 512 [ 22.175921] The buggy address is located 176 bytes inside of [ 22.175921] 512-byte region [ffff8801c932c7c0, ffff8801c932c9c0) [ 22.175923] The buggy address belongs to the page: [ 22.175928] page:0000000067319689 count:1 mapcount:0 mapping:000000004917478c index:0x0 [ 22.175933] flags: 0x2fffc0000000100(slab) [ 22.175941] raw: 02fffc0000000100 ffff8801c932c040 0000000000000000 0000000100000006 [ 22.175948] raw: ffffea000728f660 ffffea00072cf820 ffff8801db000940 0000000000000000 [ 22.175951] page dumped because: kasan: bad access detected [ 22.175952] [ 22.175953] Memory state around the buggy address: [ 22.175962] ffff8801c932c700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.175966] ffff8801c932c780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 22.175970] >ffff8801c932c800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.175973] ^ [ 22.175977] ffff8801c932c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.175981] ffff8801c932c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.175983] ================================================================== [ 22.175985] Disabling lock debugging due to kernel taint [ 22.175988] Kernel panic - not syncing: panic_on_warn set ... [ 22.175988] [ 22.175994] CPU: 1 PID: 3147 Comm: syzkaller138471 Tainted: G B 4.15.0-rc5+ #238 [ 22.175997] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.175998] Call Trace: [ 22.176007] dump_stack+0x194/0x257 [ 22.176014] ? arch_local_irq_restore+0x53/0x53 [ 22.176019] ? kasan_end_report+0x32/0x50 [ 22.176025] ? lock_downgrade+0x980/0x980 [ 22.176031] ? vsnprintf+0x1ed/0x1900 [ 22.176037] ? __lock_acquire+0x3cd0/0x3e00 [ 22.176042] panic+0x1e4/0x41c [ 22.176048] ? refcount_error_report+0x214/0x214 [ 22.176055] ? add_taint+0x40/0x50 [ 22.176060] ? add_taint+0x1c/0x50 [ 22.176067] ? __lock_acquire+0x3d4d/0x3e00 [ 22.176072] kasan_end_report+0x50/0x50 [ 22.176078] kasan_report+0x144/0x340 [ 22.176086] __asan_report_load8_noabort+0x14/0x20 [ 22.176091] __lock_acquire+0x3d4d/0x3e00 [ 22.176097] ? __lock_acquire+0x664/0x3e00 [ 22.176102] ? lock_downgrade+0x980/0x980 [ 22.176107] ? lock_downgrade+0x980/0x980 [ 22.176115] ? remove_wait_queue+0x81/0x350 [ 22.176123] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.176130] ? __lock_acquire+0x664/0x3e00 [ 22.176135] ? check_noncircular+0x20/0x20 [ 22.176146] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.176153] ? lock_acquire+0x1d5/0x580 [ 22.176158] ? lock_acquire+0x1d5/0x580 [ 22.176163] ? ep_free+0xf4/0x320 [ 22.176171] ? lock_release+0xa40/0xa40 [ 22.176177] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.176183] ? print_irqtrace_events+0x270/0x270 [ 22.176189] ? rcu_note_context_switch+0x710/0x710 [ 22.176196] ? __might_sleep+0x95/0x190 [ 22.176202] ? ep_free+0xf4/0x320 [ 22.176207] ? __mutex_lock+0x16f/0x1a80 [ 22.176211] ? ep_free+0xf4/0x320 [ 22.176218] ? print_irqtrace_events+0x270/0x270 [ 22.176222] ? ep_free+0xf4/0x320 [ 22.176230] lock_acquire+0x1d5/0x580 [ 22.176235] ? lock_acquire+0x1d5/0x580 [ 22.176241] ? remove_wait_queue+0x81/0x350 [ 22.176246] ? __lock_acquire+0x664/0x3e00 [ 22.176254] ? lock_release+0xa40/0xa40 [ 22.176262] ? lock_acquire+0x1d5/0x580 [ 22.176267] ? lock_acquire+0x1d5/0x580 [ 22.176273] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.176280] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.176286] ? remove_wait_queue+0x81/0x350 [ 22.176292] remove_wait_queue+0x81/0x350 [ 22.176299] ? add_wait_queue+0x290/0x290 [ 22.176305] ? rcutorture_record_progress+0x10/0x10 [ 22.176314] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.176320] ? __kernel_text_address+0xd/0x40 [ 22.176328] ? clear_tfile_check_list+0x370/0x370 [ 22.176335] ? check_noncircular+0x20/0x20 [ 22.176342] ? locks_remove_file+0x3fa/0x5a0 [ 22.176351] ep_free+0x13f/0x320 [ 22.176356] ? ep_remove+0x800/0x800 [ 22.176363] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.176369] ? ep_free+0x320/0x320 [ 22.176375] ep_eventpoll_release+0x44/0x60 [ 22.176380] __fput+0x327/0x7e0 [ 22.176388] ? fput+0x140/0x140 [ 22.176394] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.176402] ____fput+0x15/0x20 [ 22.176408] task_work_run+0x199/0x270 [ 22.176416] ? task_work_cancel+0x210/0x210 [ 22.176421] ? _raw_spin_unlock+0x22/0x30 [ 22.176427] ? switch_task_namespaces+0x87/0xc0 [ 22.176434] do_exit+0x9bb/0x1ad0 [ 22.176442] ? binder_ioctl+0x4a1/0x1417 [ 22.176448] ? mm_update_next_owner+0x930/0x930 [ 22.176456] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.176464] ? avc_ss_reset+0x110/0x110 [ 22.176469] ? mutex_unlock+0xd/0x10 [ 22.176474] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 22.176492] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.176497] ? up_read+0x1a/0x40 [ 22.176503] ? rcu_note_context_switch+0x710/0x710 [ 22.176509] ? __fd_install+0x288/0x740 [ 22.176517] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.176523] ? do_vfs_ioctl+0x486/0x1520 [ 22.176529] ? _cond_resched+0x14/0x30 [ 22.176537] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.176543] ? selinux_capable+0x40/0x40 [ 22.176550] ? __alloc_fd+0x750/0x750 [ 22.176558] do_group_exit+0x149/0x400 [ 22.176564] ? SyS_exit+0x30/0x30 [ 22.176571] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.176577] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.176584] SyS_exit_group+0x1d/0x20 [ 22.176591] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.176594] RIP: 0033:0x4429f8 [ 22.176597] RSP: 002b:00007fff7b42f258 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.176603] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.176606] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.176610] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.176613] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.176616] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.197021] Dumping ftrace buffer: [ 22.197024] (ftrace buffer empty) [ 22.197027] Kernel Offset: disabled [ 23.321417] Rebooting in 86400 seconds..