linux-imx/drivers/gpu
Li Qiang e7fea2a4fa drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl()
commit e7e11f99564222d82f0ce84bd521e57d78a6b678 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: Jiri Slaby <jslaby@suse.cz>
2017-04-26 20:05:00 +02:00
..
drm drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl() 2017-04-26 20:05:00 +02:00
host1x gpu: host1x: handle the correct # of syncpt regs 2014-06-06 11:40:22 +02:00
vga vgaarb: fix signal handling in vga_get() 2016-03-03 12:45:59 +01:00
Makefile gpu: host1x: Add host1x driver 2013-04-22 12:32:40 +02:00