Li Qiang
e7e11f9956
drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl()
...
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.
Cc: <stable@vger.kernel.org>
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
2017-03-30 11:46:26 +02:00
..
2017-03-17 14:44:34 -04:00
2017-02-02 19:12:00 +01:00
2017-03-10 14:31:16 +00:00
2017-02-24 17:46:54 -08:00
2017-02-28 13:25:32 +10:00
2017-02-02 19:12:00 +01:00
2017-02-02 19:12:00 +01:00
2017-02-02 15:15:31 +05:30
2017-02-02 19:12:00 +01:00
2017-03-02 08:42:40 +01:00
2017-03-21 14:30:18 +09:00
2017-02-07 20:28:04 -08:00
2017-02-24 17:46:54 -08:00
2017-02-02 19:12:00 +01:00
2016-11-18 00:00:40 +00:00
2017-01-26 10:44:43 +01:00
2017-03-21 16:51:47 +02:00
2017-02-23 12:10:42 +10:00
2016-12-27 12:34:00 +01:00
2017-01-18 09:21:06 -05:00
2017-02-02 19:12:00 +01:00
2017-02-27 18:43:47 -08:00
2017-02-02 19:12:00 +01:00
2017-02-24 17:46:54 -08:00
2017-03-10 11:11:14 +10:00
2017-02-23 18:58:18 -08:00
2017-03-13 12:53:27 +02:00
2017-01-26 10:57:18 +01:00
2017-02-24 17:46:54 -08:00
2017-03-16 10:06:11 -04:00
2017-03-09 15:50:56 -08:00
2017-02-28 12:28:00 +10:00
2017-01-09 11:25:22 +01:00
2017-02-03 11:36:49 +01:00
2017-01-09 11:25:22 +01:00
2017-02-03 11:10:32 +01:00
2017-02-23 12:54:54 +10:00
2017-02-02 19:12:00 +01:00
2016-11-02 11:33:47 -04:00
2017-02-24 17:46:54 -08:00
2017-03-14 14:28:58 +02:00
2017-02-23 18:58:18 -08:00
2017-03-30 11:43:40 +02:00
2017-02-24 17:46:54 -08:00
2017-03-02 08:42:32 +01:00
2017-03-02 15:20:00 -08:00
2017-02-03 11:10:32 +01:00
2017-03-02 13:53:13 -08:00
2017-03-30 11:46:26 +02:00
2017-02-23 08:54:15 +08:00
2017-01-26 10:44:43 +01:00
2017-02-08 16:15:42 +01:00
2017-02-23 12:10:12 +10:00
2017-01-25 16:22:42 +01:00
2017-01-25 16:30:34 +01:00
2017-01-02 09:17:26 +01:00
2017-01-24 11:00:22 +01:00
2017-01-31 15:31:58 +02:00
2017-02-23 12:10:12 +10:00
2017-01-25 16:18:57 +01:00
2017-02-17 12:39:04 +10:00
2017-01-26 10:46:28 +01:00
2017-01-06 15:23:19 +01:00
2017-01-27 09:02:03 +01:00
2017-01-25 16:18:57 +01:00
2017-02-23 18:58:18 -08:00
2017-02-23 12:10:12 +10:00
2017-01-25 16:30:34 +01:00
2017-03-06 08:28:10 +01:00
2017-01-25 16:30:34 +01:00
2017-01-25 16:30:34 +01:00
2017-02-02 19:12:00 +01:00
2017-03-23 15:12:07 +01:00
2017-01-25 16:22:42 +01:00
2016-11-12 14:19:38 +01:00
2017-02-17 12:39:04 +10:00
2017-02-23 18:58:18 -08:00
2017-01-25 16:20:21 +01:00
2016-12-30 12:52:10 +01:00
2017-01-14 11:37:18 +01:00
2017-01-26 10:45:14 +01:00
2016-12-30 12:40:48 +01:00
2017-01-26 10:45:31 +01:00
2017-01-06 11:03:07 +01:00
2017-03-02 08:42:29 +01:00
2017-02-03 11:10:32 +01:00
2017-01-23 09:26:22 +01:00
2017-02-23 18:58:18 -08:00
2017-02-01 19:01:47 +02:00
2016-12-18 14:33:22 +01:00
2017-01-25 16:30:34 +01:00
2016-12-18 16:29:29 +05:30
2017-01-04 08:30:37 +01:00
2017-01-26 10:45:14 +01:00
2017-01-25 16:18:57 +01:00
2017-01-25 16:30:34 +01:00
2017-01-25 16:22:42 +01:00
2017-01-27 15:00:26 +01:00
2016-12-30 11:43:40 +01:00
2017-02-27 18:43:47 -08:00
2017-01-25 16:30:34 +01:00
2016-12-30 13:35:54 +01:00
2016-12-30 13:34:59 +01:00
2017-01-25 16:22:42 +01:00
2017-02-24 17:46:55 -08:00
2017-02-03 11:10:32 +01:00
2017-02-18 18:04:58 +01:00
2017-02-18 18:04:58 +01:00