Files
linux/drivers/gpu/drm
Li Qiang 4ddd24d54f drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl()
commit e7e11f9956 upstream.

In vmw_surface_define_ioctl(), the 'num_sizes' is the sum of the
'req->mip_levels' array. This array can be assigned any value from
the user space. As both the 'num_sizes' and the array is uint32_t,
it is easy to make 'num_sizes' overflow. The later 'mip_levels' is
used as the loop count. This can lead an oob write. Add the check of
'req->mip_levels' to avoid this.

Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-12 12:41:11 +02:00
..
2016-11-25 15:51:57 +00:00
2017-01-09 08:32:20 +01:00
2016-11-03 10:14:19 +10:00
2016-09-19 15:04:15 +02:00
2016-09-22 00:04:02 -07:00
2016-08-07 23:38:48 -04:00
2016-09-21 13:33:50 +02:00
2016-09-22 00:01:56 -07:00
2016-09-19 11:22:08 +02:00
2016-09-06 13:56:41 -04:00
2016-09-19 13:57:38 +02:00
2016-09-19 13:57:38 +02:00
2016-05-06 16:04:48 +02:00
2016-09-19 13:57:38 +02:00
2016-09-22 00:04:02 -07:00