[....] Starting enhanced syslogd: rsyslogd[ 10.218067] audit: type=1400 audit(1517029077.236:4): avc: denied { syslog } for pid=3180 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.15.230' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.258024] ================================================================== [ 19.259113] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.260048] Read of size 8 at addr ffff8801cd04bc38 by task syzkaller262655/3328 [ 19.261032] [ 19.261268] CPU: 1 PID: 3328 Comm: syzkaller262655 Not tainted 4.9.78-g68d447c #23 [ 19.262277] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.263500] ffff8801cd1378e0 ffffffff81d943a9 ffffea0007341280 ffff8801cd04bc38 [ 19.264649] 0000000000000000 ffff8801cd04bc38 ffff8801cd04bc38 ffff8801cd137918 [ 19.265798] ffffffff8153dc23 ffff8801cd04bc38 0000000000000008 0000000000000000 [ 19.266944] Call Trace: [ 19.267304] [] dump_stack+0xc1/0x128 [ 19.268019] [] print_address_description+0x73/0x280 [ 19.268925] [] kasan_report+0x275/0x360 [ 19.269696] [] ? __lock_acquire+0x2eff/0x3640 [ 19.270569] [] __asan_report_load8_noabort+0x14/0x20 [ 19.271458] [] __lock_acquire+0x2eff/0x3640 [ 19.272263] [] ? __lock_acquire+0x629/0x3640 [ 19.273065] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.274007] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.274931] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.275921] [] ? mark_held_locks+0xaf/0x100 [ 19.276714] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.277537] [] lock_acquire+0x12e/0x410 [ 19.279205] [] ? remove_wait_queue+0x14/0x40 [ 19.285231] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.291518] [] ? remove_wait_queue+0x14/0x40 [ 19.297558] [] remove_wait_queue+0x14/0x40 [ 19.303416] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.310401] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.317651] [] ? ep_free+0x1b0/0x1b0 [ 19.322985] [] ep_free+0x96/0x1b0 [ 19.328056] [] ? ep_free+0x1b0/0x1b0 [ 19.333389] [] ep_eventpoll_release+0x44/0x60 [ 19.339510] [] __fput+0x28c/0x6e0 [ 19.344589] [] ____fput+0x15/0x20 [ 19.349662] [] task_work_run+0x115/0x190 [ 19.355346] [] do_exit+0x7e7/0x2a40 [ 19.360591] [] ? selinux_file_ioctl+0x355/0x530 [ 19.366880] [] ? release_task+0x1240/0x1240 [ 19.372821] [] ? SyS_epoll_create+0x190/0x190 [ 19.378934] [] ? fd_install+0x4d/0x60 [ 19.384353] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 19.390990] [] do_group_exit+0x108/0x320 [ 19.396671] [] SyS_exit_group+0x1d/0x20 [ 19.402271] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 19.408814] [ 19.410413] Allocated by task 3328: [ 19.414008] save_stack_trace+0x16/0x20 [ 19.417950] save_stack+0x43/0xd0 [ 19.421369] kasan_kmalloc+0xad/0xe0 [ 19.425049] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.429598] binder_get_thread+0x15d/0x750 [ 19.433799] binder_poll+0x4a/0x210 [ 19.437398] SyS_epoll_ctl+0x11d7/0x2190 [ 19.441427] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 19.446149] [ 19.447745] Freed by task 3328: [ 19.450995] save_stack_trace+0x16/0x20 [ 19.454945] save_stack+0x43/0xd0 [ 19.458369] kasan_slab_free+0x72/0xc0 [ 19.462222] kfree+0x103/0x300 [ 19.465384] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.470195] binder_thread_release+0x27d/0x540 [ 19.474748] binder_ioctl+0x9c0/0x11b0 [ 19.478618] do_vfs_ioctl+0x1aa/0x1140 [ 19.482473] SyS_ioctl+0x8f/0xc0 [ 19.485819] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 19.490538] [ 19.492134] The buggy address belongs to the object at ffff8801cd04bb80 [ 19.492134] which belongs to the cache kmalloc-512 of size 512 [ 19.504756] The buggy address is located 184 bytes inside of [ 19.504756] 512-byte region [ffff8801cd04bb80, ffff8801cd04bd80) [ 19.516596] The buggy address belongs to the page: [ 19.521493] page:ffffea0007341280 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.531658] flags: 0x8000000000004080(slab|head) [ 19.536378] page dumped because: kasan: bad access detected [ 19.542054] [ 19.543648] Memory state around the buggy address: [ 19.548550] ffff8801cd04bb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.555877] ffff8801cd04bb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.563214] >ffff8801cd04bc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.570539] ^ [ 19.575696] ffff8801cd04bc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.583107] ffff8801cd04bd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.590443] ================================================================== [ 19.597783] Disabling lock debugging due to kernel taint [ 19.603212] Kernel panic - not syncing: panic_on_warn set ... [ 19.603212] [ 19.610542] CPU: 1 PID: 3328 Comm: syzkaller262655 Tainted: G B 4.9.78-g68d447c #23 [ 19.619433] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.628758] ffff8801cd137838 ffffffff81d943a9 ffffffff841971bf ffff8801cd137910 [ 19.636727] 0000000000000000 ffff8801cd04bc38 ffff8801cd04bc38 ffff8801cd137900 [ 19.644691] ffffffff8142f451 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f295 [ 19.652679] Call Trace: [ 19.655254] [] dump_stack+0xc1/0x128 [ 19.660589] [] panic+0x1bc/0x3a8 [ 19.665580] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.673783] [] ? add_taint+0x40/0x50 [ 19.679116] [] kasan_end_report+0x50/0x50 [ 19.684887] [] kasan_report+0x167/0x360 [ 19.690481] [] ? __lock_acquire+0x2eff/0x3640 [ 19.696604] [] __asan_report_load8_noabort+0x14/0x20 [ 19.703327] [] __lock_acquire+0x2eff/0x3640 [ 19.709267] [] ? __lock_acquire+0x629/0x3640 [ 19.715297] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.722281] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.729264] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.736246] [] ? mark_held_locks+0xaf/0x100 [ 19.742184] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.748388] [] lock_acquire+0x12e/0x410 [ 19.753979] [] ? remove_wait_queue+0x14/0x40 [ 19.760006] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.766296] [] ? remove_wait_queue+0x14/0x40 [ 19.772323] [] remove_wait_queue+0x14/0x40 [ 19.778180] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.785163] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.792403] [] ? ep_free+0x1b0/0x1b0 [ 19.797734] [] ep_free+0x96/0x1b0 [ 19.802811] [] ? ep_free+0x1b0/0x1b0 [ 19.808142] [] ep_eventpoll_release+0x44/0x60 [ 19.814256] [] __fput+0x28c/0x6e0 [ 19.819325] [] ____fput+0x15/0x20 [ 19.824395] [] task_work_run+0x115/0x190 [ 19.830076] [] do_exit+0x7e7/0x2a40 [ 19.835330] [] ? selinux_file_ioctl+0x355/0x530 [ 19.841618] [] ? release_task+0x1240/0x1240 [ 19.847566] [] ? SyS_epoll_create+0x190/0x190 [ 19.853681] [] ? fd_install+0x4d/0x60 [ 19.859102] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 19.865739] [] do_group_exit+0x108/0x320 [ 19.871417] [] SyS_exit_group+0x1d/0x20 [ 19.877008] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 19.884016] Dumping ftrace buffer: [ 19.887533] (ftrace buffer empty) [ 19.891223] Kernel Offset: disabled [ 19.894819] Rebooting in 86400 seconds..