Skip to contentSkip to conversation

Patch "drm/vmwgfx: fix memory corruption with legacy/sou connectors" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Jan 20, 2018

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/vmwgfx: fix memory corruption with legacy/sou connectors

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-vmwgfx-fix-memory-corruption-with-legacy-sou-connectors.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 8a510a5c75261ba0ec39155326982aa786541e29 Mon Sep 17 00:00:00 2001

From: Rob Clark <[email protected]>
Date: Wed, 17 Jan 2018 10:16:20 -0500
Subject: drm/vmwgfx: fix memory corruption with legacy/sou connectors

From: Rob Clark <[email protected]>

commit 8a510a5c75261ba0ec39155326982aa786541e29 upstream.

It looks like in all cases 'struct vmw_connector_state' is used. But only in stdu connectors, was atomic_{duplicate,destroy}_state() properly subclassed. Leading to writes beyond the end of the allocated connector state block and all sorts of fun memory corruption related crashes.

Fixes d7721ca71126 "drm/vmwgfx: Connector atomic state"
---
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c  |    4 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +2 -2
@@ -266,8 +266,8 @@ static const struct drm_connector_funcs
 	.set_property = vmw_du_connector_set_property,
 	.destroy = vmw_ldu_connector_destroy,
 	.reset = vmw_du_connector_reset,
-	.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
-	.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
+	.atomic_duplicate_state = vmw_du_connector_duplicate_state,
+	.atomic_destroy_state = vmw_du_connector_destroy_state,
 	.atomic_set_property = vmw_du_connector_atomic_set_property,
 	.atomic_get_property = vmw_du_connector_atomic_get_property,
 };
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +2 -2
@@ -420,8 +420,8 @@ static const struct drm_connector_funcs
 	.set_property = vmw_du_connector_set_property,
 	.destroy = vmw_sou_connector_destroy,
 	.reset = vmw_du_connector_reset,
-	.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
-	.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
+	.atomic_duplicate_state = vmw_du_connector_duplicate_state,
+	.atomic_destroy_state = vmw_du_connector_destroy_state,
 	.atomic_set_property = vmw_du_connector_atomic_set_property,
 	.atomic_get_property = vmw_du_connector_atomic_get_property,
 };

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/drm-vmwgfx-fix-memory-corruption-with-legacy-sou-connectors.patch