random: sshd: uninitialized urandom read (32 bytes read, 114 bits of entropy available) ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x387e/0x4b50 kernel/locking/lockdep.c:3092 Read of size 8 at addr ffff8801d15d4838 by task syzkaller671244/3317 CPU: 0 PID: 3317 Comm: syzkaller671244 Not tainted 4.4.111-g3301b55 #24 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 a7d6f867eeabf873 ffff8801d09678d0 ffffffff81d0509d ffffea0007457500 ffff8801d15d4838 0000000000000000 ffff8801d15d4838 0000000000000000 ffff8801d0967908 ffffffff814fd433 ffff8801d15d4838 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x73/0x260 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x285/0x370 mm/kasan/report.c:408 [] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:429 [] __lock_acquire+0x387e/0x4b50 kernel/locking/lockdep.c:3092 [] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592 [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:112 [inline] [] _raw_spin_lock_irqsave+0x4e/0x70 kernel/locking/spinlock.c:159 [] remove_wait_queue+0x14/0x40 kernel/sched/wait.c:49 [] ep_remove_wait_queue fs/eventpoll.c:530 [inline] [] ep_unregister_pollwait.isra.6+0xa8/0x220 fs/eventpoll.c:548 [] ep_free+0x93/0x1c0 fs/eventpoll.c:765 [] ep_eventpoll_release+0x44/0x60 fs/eventpoll.c:797 [] __fput+0x233/0x6d0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x104/0x180 kernel/task_work.c:115 [] exit_task_work include/linux/task_work.h:21 [inline] [] do_exit+0x871/0x2a20 kernel/exit.c:755 [] do_group_exit+0x108/0x320 kernel/exit.c:885 [] SYSC_exit_group kernel/exit.c:896 [inline] [] SyS_exit_group+0x1d/0x20 kernel/exit.c:894 [] entry_SYSCALL_64_fastpath+0x16/0x92 Allocated by task 3317: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:616 [] kmem_cache_alloc_trace+0x100/0x2b0 mm/slub.c:2642 [] kmalloc include/linux/slab.h:476 [inline] [] kzalloc include/linux/slab.h:620 [inline] [] binder_get_thread+0x181/0x7a0 drivers/android/binder.c:4452 [] binder_poll+0x4a/0x210 drivers/android/binder.c:4555 [] ep_item_poll fs/eventpoll.c:806 [inline] [] ep_insert fs/eventpoll.c:1319 [inline] [] SYSC_epoll_ctl fs/eventpoll.c:1934 [inline] [] SyS_epoll_ctl+0x10b1/0x2050 fs/eventpoll.c:1833 [] entry_SYSCALL_64_fastpath+0x16/0x92 Freed by task 3317: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kfree+0xfc/0x300 mm/slub.c:3749 [] binder_free_thread drivers/android/binder.c:4480 [inline] [] binder_thread_dec_tmpref+0x1c1/0x250 drivers/android/binder.c:2036 [] binder_thread_release+0x27d/0x540 drivers/android/binder.c:4544 [] binder_ioctl+0xb94/0x12e0 drivers/android/binder.c:4760 [] vfs_ioctl fs/ioctl.c:43 [inline] [] do_vfs_ioctl+0x7aa/0xee0 fs/ioctl.c:607 [] SYSC_ioctl fs/ioctl.c:622 [inline] [] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:613 [] entry_SYSCALL_64_fastpath+0x16/0x92 The buggy address belongs to the object at ffff8801d15d4780 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 184 bytes inside of 512-byte region [ffff8801d15d4780, ffff8801d15d4980) The buggy address belongs to the page: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 1734 Comm: udevd Not tainted 4.4.111-g3301b55 #24 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8800b64e4740 task.stack: ffff8801d3a30000 RIP: 0010:[] [] avc_search_node security/selinux/avc.c:584 [inline] RIP: 0010:[] [] avc_lookup security/selinux/avc.c:612 [inline] RIP: 0010:[] [] avc_has_perm_noaudit+0x1bb/0x460 security/selinux/avc.c:1112 RSP: 0018:ffff8801d3a37748 EFLAGS: 00010a07 RAX: 1d2000dc1b1d015c RBX: e90006e0d8e80ae7 RCX: ffffffff81b4d324 RDX: 0000000000000000 RSI: ffffffff839fd920 RDI: ffff8800b64e4fac RBP: ffff8801d3a37818 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 1ffff1003a746eb4 R12: dffffc0000000000 R13: 0000000000000001 R14: ffff8801d3a37858 R15: 0000000000000007 FS: 00007f6dc7aad7a0(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000564c6a9f60f0 CR3: 00000001d3a3c000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff81b4d212 ffff8800b64e4ff8 0000000700000000 1ffff1003a746eee 0000000500400000 0000000041b58ab3 ffffffff83fc7cae ffffffff81b4d170 ffffffff8151b8ed ffffffff83775899 ffffffffffffffff ffffffff814fcd42 Call Trace: [] selinux_inode_permission+0x281/0x4b0 security/selinux/hooks.c:2917 [] security_inode_permission+0xaf/0xf0 security/security.c:600 [] __inode_permission2+0x93/0x240 fs/namei.c:424 [] inode_permission2+0x2f/0x100 fs/namei.c:474 [] may_lookup fs/namei.c:1663 [inline] [] link_path_walk+0x1ac/0x16e0 fs/namei.c:1927 [] path_openat+0x22d/0x3b60 fs/namei.c:3353 [] do_filp_open+0x197/0x290 fs/namei.c:3388 [] do_sys_open+0x343/0x4b0 fs/open.c:1038 [] SYSC_open fs/open.c:1056 [inline] [] SyS_open+0x2d/0x40 fs/open.c:1051 [] entry_SYSCALL_64_fastpath+0x16/0x92 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 RIP [] avc_search_node security/selinux/avc.c:584 [inline] RIP [] avc_lookup security/selinux/avc.c:612 [inline] RIP [] avc_has_perm_noaudit+0x1bb/0x460 security/selinux/avc.c:1112 RSP ---[ end trace 1436ef2e04008e0f ]---