diff options
| author | Li Qiang <liq3ea@gmail.com> | 2017-03-27 20:10:53 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-07-04 12:11:18 +0200 |
| commit | b20b92645f381dcf20f96808a106f65118710ef8 (patch) | |
| tree | a086e76544f61a68eb00c04667f390b639628d05 /include/linux/errqueue.h | |
| parent | 0689ad0b3f3052f63c5d35694145d7dbbd239e1d (diff) | |
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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions
