]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl()
authorMurray McAllister <murray.mcallister@insomniasec.com>
Mon, 27 Mar 2017 09:12:53 +0000 (11:12 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 30 Mar 2017 09:43:23 +0000 (11:43 +0200)
commit6630f4a1f4d4d409ede25d88f4183356a9db030f
tree66420861d31f36707f6f7822804fbb399ccb81ca
parentf1d1e1598ce1c2a3e9fb20d414ca9d0cfe22a8df
drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl()

Before memory allocations vmw_surface_define_ioctl() checks the
upper-bounds of a user-supplied size, but does not check if the
supplied size is 0.

Add check to avoid NULL pointer dereferences.

Cc: <stable@vger.kernel.org>
Signed-off-by: Murray McAllister <murray.mcallister@insomniasec.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c