HardenedBSD/sys/i386/include
Dan Carpenter e99c0c8b79 xen: Prevent buffer overflow in privcmd ioctl
The "call" variable comes from the user in privcmd_ioctl_hypercall().
It's an offset into the hypercall_page[] which has (PAGE_SIZE / 32)
elements.  We need to put an upper bound on it to prevent an out of
bounds access.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>

Obtained from: Linux
Linux commit: 42d8644bd77dd2d747e004e367cb0c895a606f39
Fixes: bf7313e3b7 ("xen: implement the privcmd user-space device")
Submitted by: Elliott Mitchell <ehem+freebsd@m5p.com>
Reviewed by: royger
2022-05-06 09:31:32 +02:00
..
pc
xen xen: Prevent buffer overflow in privcmd ioctl 2022-05-06 09:31:32 +02:00
_align.h
_bus.h
_inttypes.h
_limits.h
_stdint.h
_types.h
acpica_machdep.h
apm_bios.h
apm_segments.h
asm.h
asmacros.h
atomic.h Remove checks for <sys/cdefs.h> being included. 2022-04-12 10:06:18 -07:00
bootinfo.h
bus_dma.h
bus.h
clock.h
counter.h
cpu.h
cpufunc.h Remove checks for <sys/cdefs.h> being included. 2022-04-12 10:06:18 -07:00
cputypes.h
db_machdep.h
dump.h
efi.h
elan_mmcr.h
elf.h
endian.h
exec.h
fdt.h
float.h
floatingpoint.h
fpu.h
frame.h
gdb_machdep.h
ieeefp.h
in_cksum.h
intr_machdep.h
iodev.h
iommu.h
kdb.h
limits.h
md_var.h
memdev.h
metadata.h
minidump.h
mp_watchdog.h
nexusvar.h
npx.h
ofw_machdep.h
param.h
pcb_ext.h
pcb.h
pci_cfgreg.h
pcpu_aux.h
pcpu.h Remove checks for <sys/cdefs.h> being included. 2022-04-12 10:06:18 -07:00
perfmon.h
pmap_base.h
pmap_nopae.h
pmap_pae.h
pmap.h
pmc_mdep.h
ppireg.h
proc.h
procctl.h
profile.h
psl.h
ptrace.h
pvclock.h
reg.h
reloc.h
resource.h
runq.h
segments.h
setjmp.h
sf_buf.h
sigframe.h
signal.h
smapi.h
smp.h
speaker.h
specialreg.h
stack.h
stdarg.h
sysarch.h
timerreg.h
tls.h
trap.h
tss.h
ucontext.h
vdso.h
vm86.h
vm.h
vmparam.h