[....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 16.125809] random: sshd: uninitialized urandom read (32 bytes read, 33 bits of entropy available) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 21.213035] random: sshd: uninitialized urandom read (32 bytes read, 38 bits of entropy available) [ 21.561519] random: sshd: uninitialized urandom read (32 bytes read, 38 bits of entropy available) [ 22.381792] random: sshd: uninitialized urandom read (32 bytes read, 102 bits of entropy available) [ 22.558388] random: sshd: uninitialized urandom read (32 bytes read, 107 bits of entropy available) Warning: Permanently added '10.128.0.2' (ECDSA) to the list of known hosts. [ 27.974681] random: sshd: uninitialized urandom read (32 bytes read, 114 bits of entropy available) executing program [ 28.083241] ================================================================== [ 28.090639] BUG: KASAN: use-after-free in __lock_acquire+0x387e/0x4b50 [ 28.097271] Read of size 8 at addr ffff8801d15d4838 by task syzkaller671244/3317 [ 28.104769] [ 28.106367] CPU: 0 PID: 3317 Comm: syzkaller671244 Not tainted 4.4.111-g3301b55 #24 [ 28.114125] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.123458] 0000000000000000 a7d6f867eeabf873 ffff8801d09678d0 ffffffff81d0509d [ 28.131437] ffffea0007457500 ffff8801d15d4838 0000000000000000 ffff8801d15d4838 [ 28.139401] 0000000000000000 ffff8801d0967908 ffffffff814fd433 ffff8801d15d4838 [ 28.147366] Call Trace: [ 28.149923] [] dump_stack+0xc1/0x124 [ 28.155257] [] print_address_description+0x73/0x260 [ 28.161888] [] kasan_report+0x285/0x370 [ 28.167480] [] ? __lock_acquire+0x387e/0x4b50 [ 28.173590] [] __asan_report_load8_noabort+0x14/0x20 [ 28.180309] [] __lock_acquire+0x387e/0x4b50 [ 28.186246] [] ? __lock_acquire+0xb5f/0x4b50 [ 28.192274] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.199261] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.206239] [] ? mark_held_locks+0xaf/0x100 [ 28.212176] [] lock_acquire+0x15e/0x460 [ 28.217766] [] ? remove_wait_queue+0x14/0x40 [ 28.223791] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.230083] [] ? remove_wait_queue+0x14/0x40 [ 28.236105] [] remove_wait_queue+0x14/0x40 [ 28.241959] [] ep_unregister_pollwait.isra.6+0xa8/0x220 [ 28.248950] [] ? ep_unregister_pollwait.isra.6+0x114/0x220 [ 28.256190] [] ? ep_free+0x1c0/0x1c0 [ 28.261519] [] ep_free+0x93/0x1c0 [ 28.266590] [] ? ep_free+0x1c0/0x1c0 [ 28.271920] [] ep_eventpoll_release+0x44/0x60 [ 28.278039] [] __fput+0x233/0x6d0 [ 28.283108] [] ____fput+0x15/0x20 [ 28.288180] [] task_work_run+0x104/0x180 [ 28.293856] [] do_exit+0x871/0x2a20 [ 28.299100] [] ? release_task+0x1240/0x1240 [ 28.305039] [] ? SyS_epoll_create+0x190/0x190 [ 28.311148] [] do_group_exit+0x108/0x320 [ 28.316839] [] ? lockdep_sys_exit_thunk+0x12/0x14 [ 28.323296] [] SyS_exit_group+0x1d/0x20 [ 28.328895] [] entry_SYSCALL_64_fastpath+0x16/0x92 [ 28.335437] [ 28.337032] Allocated by task 3317: [ 28.340621] [] save_stack_trace+0x26/0x50 [ 28.346501] [] save_stack+0x43/0xd0 [ 28.351860] [] kasan_kmalloc+0xad/0xe0 [ 28.357476] [] kmem_cache_alloc_trace+0x100/0x2b0 [ 28.364074] [] binder_get_thread+0x181/0x7a0 [ 28.370215] [] binder_poll+0x4a/0x210 [ 28.375765] [] SyS_epoll_ctl+0x10b1/0x2050 [ 28.381730] [] entry_SYSCALL_64_fastpath+0x16/0x92 [ 28.388396] [ 28.389998] Freed by task 3317: [ 28.393240] [] save_stack_trace+0x26/0x50 [ 28.399120] [] save_stack+0x43/0xd0 [ 28.404482] [] kasan_slab_free+0x72/0xc0 [ 28.410271] [] kfree+0xfc/0x300 [ 28.415281] [] binder_thread_dec_tmpref+0x1c1/0x250 [ 28.422043] [] binder_thread_release+0x27d/0x540 [ 28.428529] [] binder_ioctl+0xb94/0x12e0 [ 28.434328] [] do_vfs_ioctl+0x7aa/0xee0 [ 28.440036] [] SyS_ioctl+0x8f/0xc0 [ 28.445312] [] entry_SYSCALL_64_fastpath+0x16/0x92 [ 28.451977] [ 28.453572] The buggy address belongs to the object at ffff8801d15d4780 [ 28.453572] which belongs to the cache kmalloc-512 of size 512 [ 28.466193] The buggy address is located 184 bytes inside of [ 28.466193] 512-byte region [ffff8801d15d4780, ffff8801d15d4980) [ 28.478038] The buggy address belongs to the page: [ 29.195422] kasan: CONFIG_KASAN_INLINE enabled [ 29.199874] kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP KASAN [ 29.212900] Dumping ftrace buffer: [ 29.216425] (ftrace buffer empty) [ 29.220120] Modules linked in: [ 29.223427] CPU: 1 PID: 1734 Comm: udevd Not tainted 4.4.111-g3301b55 #24 [ 29.230349] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.239694] task: ffff8800b64e4740 task.stack: ffff8801d3a30000 [ 29.245739] RIP: 0010:[] [] avc_has_perm_noaudit+0x1bb/0x460 [ 29.254885] RSP: 0018:ffff8801d3a37748 EFLAGS: 00010a07 [ 29.260342] RAX: 1d2000dc1b1d015c RBX: e90006e0d8e80ae7 RCX: ffffffff81b4d324 [ 29.267617] RDX: 0000000000000000 RSI: ffffffff839fd920 RDI: ffff8800b64e4fac [ 29.274876] RBP: ffff8801d3a37818 R08: 0000000000000001 R09: 0000000000000000 [ 29.282132] R10: 0000000000000000 R11: 1ffff1003a746eb4 R12: dffffc0000000000 [ 29.289388] R13: 0000000000000001 R14: ffff8801d3a37858 R15: 0000000000000007 [ 29.296652] FS: 00007f6dc7aad7a0(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 [ 29.304862] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 29.310734] CR2: 0000564c6a9f60f0 CR3: 00000001d3a3c000 CR4: 0000000000160670 [ 29.317999] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 29.325259] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 29.332538] Stack: [ 29.334677] ffffffff81b4d212 ffff8800b64e4ff8 0000000700000000 1ffff1003a746eee [ 29.342726] 0000000500400000 0000000041b58ab3 ffffffff83fc7cae ffffffff81b4d170 [ 29.350753] ffffffff8151b8ed ffffffff83775899 ffffffffffffffff ffffffff814fcd42 [ 29.358783] Call Trace: [ 29.361365] [] ? avc_has_perm_noaudit+0xa2/0x460 [ 29.367780] [] ? avc_has_extended_perms+0xf30/0xf30 [ 29.374443] [] ? SyS_open+0x2d/0x40 [ 29.379739] [] ? entry_SYSCALL_64_fastpath+0x16/0x92 [ 29.386481] [] ? kasan_slab_alloc+0x12/0x20 [ 29.392444] [] ? kmem_cache_alloc+0xba/0x290 [ 29.398494] [] ? get_empty_filp+0x8f/0x3b0 [ 29.404395] [] ? path_openat+0xc8/0x3b60 [ 29.410102] [] ? do_filp_open+0x197/0x290 [ 29.415899] [] ? do_sys_open+0x343/0x4b0 [ 29.421606] [] selinux_inode_permission+0x281/0x4b0 [ 29.428268] [] ? selinux_bprm_committed_creds+0x440/0x440 [ 29.435460] [] security_inode_permission+0xaf/0xf0 [ 29.442036] [] __inode_permission2+0x93/0x240 [ 29.448176] [] inode_permission2+0x2f/0x100 [ 29.454137] [] link_path_walk+0x1ac/0x16e0 [ 29.460012] [] ? path_init+0x44a/0x1840 [ 29.465631] [] ? walk_component+0xff0/0xff0 [ 29.471604] [] ? __mutex_init+0xca/0x100 [ 29.477350] [] path_openat+0x22d/0x3b60 [ 29.482971] [] ? path_mountpoint+0x830/0x830 [ 29.489020] [] ? getname_flags+0xcb/0x580 [ 29.494807] [] ? getname+0x19/0x20 [ 29.499990] [] ? do_sys_open+0x205/0x4b0 [ 29.505693] [] ? SyS_open+0x2d/0x40 [ 29.510959] [] ? entry_SYSCALL_64_fastpath+0x16/0x92 [ 29.517707] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.524737] [] ? __lock_is_held+0xa1/0xf0 [ 29.530533] [] do_filp_open+0x197/0x290 [ 29.536151] [] ? user_path_mountpoint_at+0x40/0x40 [ 29.544034] [] ? _raw_spin_unlock+0x2c/0x50 [ 29.550002] [] ? __alloc_fd+0x1e3/0x500 [ 29.555624] [] do_sys_open+0x343/0x4b0 [ 29.561153] [] ? filp_open+0x70/0x70 [ 29.566505] [] ? SyS_read+0x1b0/0x1b0 [ 29.571944] [] SyS_open+0x2d/0x40 [ 29.577055] [] entry_SYSCALL_64_fastpath+0x16/0x92 [ 29.583634] Code: 5b 28 e8 89 7b 73 ff 48 85 db 0f 84 6f 01 00 00 e8 6b 2b 81 ff 48 83 eb 28 0f 84 60 01 00 00 e8 5c 2b 81 ff 48 89 d8 48 c1 e8 03 <42> 0f b6 04 20 84 c0 74 08 3c 03 0f 8e 66 02 00 00 44 3b 2b 75 [ 29.610970] RIP [] avc_has_perm_noaudit+0x1bb/0x460 [ 29.617754] RSP [ 29.621854] ---[ end trace 1436ef2e04008e0f ]--- [ 29.626679] Kernel panic - not syncing: Fatal exception [ 30.154743] PANIC: double fault, error_code: 0x0 [ 30.159546] CPU: 0 PID: 3317 Comm: syzkaller671244 Tainted: G D 4.4.111-g3301b55 #24 [ 30.168535] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.177868] task: ffff8800b4e8df00 task.stack: ffff8801d0960000 [ 30.183894] RIP: 0010:[] [] dump_page_badflags+0x1a/0x250 [ 30.192747] RSP: 0018:ffff880100000000 EFLAGS: 00010086 [ 30.198171] RAX: ffff8800b4e8df00 RBX: ffffea0007457500 RCX: ffffffff8148f980 [ 30.205430] RDX: 0000000000000000 RSI: ffffffff838a83a0 RDI: ffffea0007457500 [ 30.212680] RBP: ffff880100000030 R08: 0000000000000001 R09: 0000000000000000 [ 30.219919] R10: 0000000000000002 R11: fffffbfff0ad781e R12: 0000000000000000 [ 30.227159] R13: ffffffff838a83a0 R14: 0000000000000000 R15: 0000000000000000 [ 30.234405] FS: 0000000000000000(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000 [ 30.242601] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 30.248455] CR2: ffff8800fffffff8 CR3: 000000000420c000 CR4: 0000000000160670 [ 30.255698] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 30.262939] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 30.270177] Stack: [ 30.272297] [ 30.273891] Call Trace: [ 30.276441] [ 30.278471] Code: e2 06 00 e9 1d fd ff ff 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 41 56 41 55 49 89 f5 41 54 49 89 d4 53 48 89 fb 48 83 ec 08 61 06 ed ff 48 8d 7b 10 48 b8 00 00 00 00 00 fc ff df 48 89 [ 30.749015] Shutting down cpus with NMI [ 30.753429] Dumping ftrace buffer: [ 30.756936] (ftrace buffer empty) [ 30.760612] Kernel Offset: disabled [ 30.764204] Rebooting in 86400 seconds..