1
0
Fork 0

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: Dan Carpenter <dan.carpenter@oracle.com>
cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@gmail.com>
hifive-unleashed-5.1
Dan Carpenter 2012-09-23 19:33:55 +03:00 committed by Dave Airlie
parent 4f20d9ebb9
commit 68c4fce737
1 changed files with 1 additions and 1 deletions

View File

@ -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;