]> git.itanic.dy.fi Git - linux-stable/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)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:04:41 +0000 (14:04 +0200)
commit30cd45a69bc69b191b0f6c14b317a6aeb4771439
tree946cf8b0953d29697bcb23b0624cbaa60e82101b
parent02f1f3f6b8eea3f16c8ada4da8a89688bf4cd525
drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl()

commit 36274ab8c596f1240c606bb514da329add2a1bcd upstream.

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.

Signed-off-by: Murray McAllister <murray.mcallister@insomniasec.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c