[PATCH] Prevent heap overflow in uvc driver
authorRobb Glasser <rglasser@google.com>
Sun, 16 Apr 2017 17:55:58 +0000 (22:55 +0530)
committerManish Tuteja <mtuteja@nvidia.com>
Tue, 18 Apr 2017 21:25:10 +0000 (14:25 -0700)
commit2ce4b93b8abcdeafd922ad03ab77b490d49f2e96
treebfad9f82f5c776ae22533299eebb2b631bbedb9c
parentd97f69ee6e71a4afc01b31279daa6714bb89e303
[PATCH] Prevent heap overflow in uvc driver

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.

Bug 1899974

Bug: 33300353
Change-Id: If29c1b396633b6137966a12e38f6fd1841b045bd
Signed-off-by: Robb Glasser <rglasser@google.com>
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1463514
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/media/usb/uvc/uvc_ctrl.c