]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
media: uvcvideo: Prevent heap overflow when accessing mapped controls
authorGuenter Roeck <linux@roeck-us.net>
Tue, 8 Aug 2017 12:56:21 +0000 (08:56 -0400)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 28 Sep 2017 14:36:13 +0000 (10:36 -0400)
commit33b6420836f763868b5a2e7987f72f83c42c00c1
tree7d6b614542259d25cf60c34b0e61fd94b1ef71fc
parentc6aad4a972a67a49360e9ae2d719f01a65ca2a33
media: uvcvideo: Prevent heap overflow when accessing mapped controls

BugLink: http://bugs.launchpad.net/bugs/1720154
commit 7e09f7d5c790278ab98e5f2c22307ebe8ad6e8ba upstream.

The size of uvc_control_mapping is user controlled leading to a
potential heap overflow in the uvc driver. This adds a check to verify
the user provided size fits within the bounds of the defined buffer
size.

Originally-from: Richard Simmons <rssimmo@amazon.com>

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/media/usb/uvc/uvc_ctrl.c