summaryrefslogtreecommitdiff
path: root/arch/x86/um/ldt.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-05-15 01:47:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-16 10:17:24 +0300
commitdb7e50136a20bc175fe081ff1764b5b96af85e2d (patch)
tree4f2b7bc8106182f799cb85df135453887a258362 /arch/x86/um/ldt.c
parent3b187319bc7c896691f317384e4035be489ae9fc (diff)
downloadlinux-db7e50136a20bc175fe081ff1764b5b96af85e2d.tar.xz
drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl
commit 6a024330650e24556b8a18cc654ad00cfecf6c6c upstream. The "param.count" value is a u64 thatcomes from the user. The code later in the function assumes that param.count is at least one and if it's not then it leads to an Oops when we dereference the ZERO_SIZE_PTR. Also the addition can have an integer overflow which would lead us to allocate a smaller "pages" array than required. I can't immediately tell what the possible run times implications are, but it's safest to prevent the overflow. Link: http://lkml.kernel.org/r/20181218082129.GE32567@kadam Fixes: 6db7199407ca ("drivers/virt: introduce Freescale hypervisor management driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Timur Tabi <timur@freescale.com> Cc: Mihai Caraman <mihai.caraman@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/um/ldt.c')
0 files changed, 0 insertions, 0 deletions