Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-5.1b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fixes from Juergen Gross:
"One minor fix and a small cleanup for the xen privcmd driver"

* tag 'for-linus-5.1b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen: Prevent buffer overflow in privcmd ioctl
xen: use struct_size() helper in kzalloc()

+4 -2
+3
arch/x86/include/asm/xen/hypercall.h
··· 206 206 __HYPERCALL_DECLS; 207 207 __HYPERCALL_5ARG(a1, a2, a3, a4, a5); 208 208 209 + if (call >= PAGE_SIZE / sizeof(hypercall_page[0])) 210 + return -EINVAL; 211 + 209 212 asm volatile(CALL_NOSPEC 210 213 : __HYPERCALL_5PARAM 211 214 : [thunk_target] "a" (&hypercall_page[call])
+1 -2
drivers/xen/privcmd-buf.c
··· 140 140 if (!(vma->vm_flags & VM_SHARED)) 141 141 return -EINVAL; 142 142 143 - vma_priv = kzalloc(sizeof(*vma_priv) + count * sizeof(void *), 144 - GFP_KERNEL); 143 + vma_priv = kzalloc(struct_size(vma_priv, pages, count), GFP_KERNEL); 145 144 if (!vma_priv) 146 145 return -ENOMEM; 147 146