Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68c4fce7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dave Airlie
Browse files

vmwgfx: corruption in vmw_event_fence_action_create()



We don't allocate enough data for this struct.  As soon as we start
modifying event->event on the next lines, then we're going beyond the
end of the memory we allocated.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
cc: stable@vger.kernel.org
Signed-off-by: default avatarDave Airlie <airlied@gmail.com>
parent 4f20d9eb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1018,7 +1018,7 @@ int vmw_event_fence_action_create(struct drm_file *file_priv,
	}


	event = kzalloc(sizeof(event->event), GFP_KERNEL);
	event = kzalloc(sizeof(*event), GFP_KERNEL);
	if (unlikely(event == NULL)) {
		DRM_ERROR("Failed to allocate an event.\n");
		ret = -ENOMEM;