[....] Starting enhanced syslogd: rsyslogd[ 10.796150] audit: type=1400 audit(1515984380.492:4): avc: denied { syslog } for pid=3174 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 Warning: Permanently added '10.128.0.14' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.742227] ================================================================== [ 18.744280] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 18.745181] Read of size 8 at addr ffff8801cc43efb8 by task syzkaller221237/3323 [ 18.746213] [ 18.746466] CPU: 0 PID: 3323 Comm: syzkaller221237 Not tainted 4.9.76-gf0f6293 #12 [ 18.747503] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.748792] ffff8801c8f9f8e0 ffffffff81d93149 ffffea0007310f80 ffff8801cc43efb8 [ 18.749947] 0000000000000000 ffff8801cc43efb8 ffff8801cc43efb8 ffff8801c8f9f918 [ 18.751095] ffffffff8153cb43 ffff8801cc43efb8 0000000000000008 0000000000000000 [ 18.752264] Call Trace: [ 18.752625] [] dump_stack+0xc1/0x128 [ 18.753339] [] print_address_description+0x73/0x280 [ 18.754368] [] kasan_report+0x275/0x360 [ 18.755113] [] ? __lock_acquire+0x2eff/0x3640 [ 18.755937] [] __asan_report_load8_noabort+0x14/0x20 [ 18.756901] [] __lock_acquire+0x2eff/0x3640 [ 18.757725] [] ? __lock_acquire+0x629/0x3640 [ 18.758524] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.759471] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.760392] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.761318] [] ? mark_held_locks+0xaf/0x100 [ 18.762137] [] ? mutex_lock_nested+0x5e3/0x870 [ 18.763034] [] lock_acquire+0x12e/0x410 [ 18.768633] [] ? remove_wait_queue+0x14/0x40 [ 18.774665] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 18.780951] [] ? remove_wait_queue+0x14/0x40 [ 18.786979] [] remove_wait_queue+0x14/0x40 [ 18.792836] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 18.801467] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 18.808711] [] ? ep_free+0x1b0/0x1b0 [ 18.814042] [] ep_free+0x96/0x1b0 [ 18.819113] [] ? ep_free+0x1b0/0x1b0 [ 18.824444] [] ep_eventpoll_release+0x44/0x60 [ 18.830560] [] __fput+0x28c/0x6e0 [ 18.835634] [] ____fput+0x15/0x20 [ 18.840705] [] task_work_run+0x115/0x190 [ 18.846388] [] do_exit+0x7e7/0x2a40 [ 18.851633] [] ? selinux_file_ioctl+0x355/0x530 [ 18.857922] [] ? release_task+0x1240/0x1240 [ 18.864643] [] ? SyS_epoll_create+0x190/0x190 [ 18.870757] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 18.877392] [] do_group_exit+0x108/0x320 [ 18.883072] [] SyS_exit_group+0x1d/0x20 [ 18.888663] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 18.895207] [ 18.896806] Allocated by task 3323: [ 18.900406] save_stack_trace+0x16/0x20 [ 18.904350] save_stack+0x43/0xd0 [ 18.908905] kasan_kmalloc+0xad/0xe0 [ 18.913283] kmem_cache_alloc_trace+0xfb/0x2a0 [ 18.917840] binder_get_thread+0x15d/0x750 [ 18.922788] binder_poll+0x4a/0x210 [ 18.928822] SyS_epoll_ctl+0x11d7/0x2190 [ 18.932855] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 18.937575] [ 18.939171] Freed by task 3323: [ 18.942420] save_stack_trace+0x16/0x20 [ 18.946362] save_stack+0x43/0xd0 [ 18.949794] kasan_slab_free+0x72/0xc0 [ 18.953662] kfree+0x103/0x300 [ 18.956840] binder_thread_dec_tmpref+0x1cc/0x240 [ 18.962020] binder_thread_release+0x27d/0x540 [ 18.966590] binder_ioctl+0x9c0/0x11b0 [ 18.970732] do_vfs_ioctl+0x1aa/0x1140 [ 18.975870] SyS_ioctl+0x8f/0xc0 [ 18.979216] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 18.983953] [ 18.985562] The buggy address belongs to the object at ffff8801cc43ef00 [ 18.985562] which belongs to the cache kmalloc-512 of size 512 [ 18.998452] The buggy address is located 184 bytes inside of [ 18.998452] 512-byte region [ffff8801cc43ef00, ffff8801cc43f100) [ 19.010299] The buggy address belongs to the page: [ 19.015198] page:ffffea0007310f80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.025717] flags: 0x8000000000004080(slab|head) [ 19.030874] page dumped because: kasan: bad access detected [ 19.036549] [ 19.038144] Memory state around the buggy address: [ 19.043043] ffff8801cc43ee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.050371] ffff8801cc43ef00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.057707] >ffff8801cc43ef80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.065035] ^ [ 19.070192] ffff8801cc43f000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.077518] ffff8801cc43f080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.084853] ================================================================== [ 19.092177] Disabling lock debugging due to kernel taint [ 19.097596] Kernel panic - not syncing: panic_on_warn set ... [ 19.097596] [ 19.104929] CPU: 0 PID: 3323 Comm: syzkaller221237 Tainted: G B 4.9.76-gf0f6293 #12 [ 19.113818] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.123143] ffff8801c8f9f838 ffffffff81d93149 ffffffff84195c17 ffff8801c8f9f910 [ 19.131109] 0000000000000000 ffff8801cc43efb8 ffff8801cc43efb8 ffff8801c8f9f900 [ 19.139073] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 19.147043] Call Trace: [ 19.149602] [] dump_stack+0xc1/0x128 [ 19.154944] [] panic+0x1bc/0x3a8 [ 19.159938] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.168135] [] ? add_taint+0x40/0x50 [ 19.173476] [] kasan_end_report+0x50/0x50 [ 19.179250] [] kasan_report+0x167/0x360 [ 19.184845] [] ? __lock_acquire+0x2eff/0x3640 [ 19.190959] [] __asan_report_load8_noabort+0x14/0x20 [ 19.197678] [] __lock_acquire+0x2eff/0x3640 [ 19.203623] [] ? __lock_acquire+0x629/0x3640 [ 19.209649] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.216977] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.223958] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.230937] [] ? mark_held_locks+0xaf/0x100 [ 19.236880] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.243088] [] lock_acquire+0x12e/0x410 [ 19.248686] [] ? remove_wait_queue+0x14/0x40 [ 19.254712] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.261000] [] ? remove_wait_queue+0x14/0x40 [ 19.267036] [] remove_wait_queue+0x14/0x40 [ 19.272891] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.279875] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.287124] [] ? ep_free+0x1b0/0x1b0 [ 19.292456] [] ep_free+0x96/0x1b0 [ 19.297533] [] ? ep_free+0x1b0/0x1b0 [ 19.302865] [] ep_eventpoll_release+0x44/0x60 [ 19.308987] [] __fput+0x28c/0x6e0 [ 19.314059] [] ____fput+0x15/0x20 [ 19.319131] [] task_work_run+0x115/0x190 [ 19.324819] [] do_exit+0x7e7/0x2a40 [ 19.330065] [] ? selinux_file_ioctl+0x355/0x530 [ 19.336352] [] ? release_task+0x1240/0x1240 [ 19.342292] [] ? SyS_epoll_create+0x190/0x190 [ 19.348407] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 19.355129] [] do_group_exit+0x108/0x320 [ 19.362031] [] SyS_exit_group+0x1d/0x20 [ 19.368318] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 19.375735] Dumping ftrace buffer: [ 19.379252] (ftrace buffer empty) [ 19.382938] Kernel Offset: disabled [ 19.386540] Rebooting in 86400 seconds..