diff options
| author | Haogang Chen <[email protected]> | 2011-11-29 18:32:25 -0300 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2011-12-11 11:23:54 -0200 |
| commit | 806e23e95f94a27ee445022d724060b9b45cb64a (patch) | |
| tree | 785b64a9a8b6fe3e64414760dd8229fb171563a6 /tools/perf/scripts/python | |
| parent | 66847ef013cc4ed3ae519360e7e4cbf531465ae8 (diff) | |
[media] uvcvideo: Fix integer overflow in uvc_ioctl_ctrl_map()
There is a potential integer overflow in uvc_ioctl_ctrl_map(). When a
large xmap->menu_count is passed from the userspace, the subsequent call
to kmalloc() will allocate a buffer smaller than expected.
map->menu_count and map->menu_info would later be used in a loop (e.g.
in uvc_query_v4l2_ctrl), which leads to out-of-bound access.
The patch checks the ioctl argument and returns -EINVAL for zero or too
large values in xmap->menu_count.
Signed-off-by: Haogang Chen <[email protected]>
[[email protected] Prevent excessive memory consumption]
Signed-off-by: Laurent Pinchart <[email protected]>
Cc: [email protected]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions