Skip to contentSkip to conversation

Patch "misc: mic: Fix for double fetch security bug in VOP driver" has been added to the 4.6-stable tree

PATCH [email protected] 1 participant 1 message May 30, 2016

Subsystems (2)
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

misc: mic: Fix for double fetch security bug in VOP driver

to the 4.6-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:
misc-mic-fix-for-double-fetch-security-bug-in-vop-driver.patch
and it can be found in the queue-4.6 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 9bf292bfca94694a721449e3fd752493856710f6 Mon Sep 17 00:00:00 2001

From: Ashutosh Dixit <[email protected]>
Date: Wed, 27 Apr 2016 14:36:05 -0700
Subject: misc: mic: Fix for double fetch security bug in VOP driver

From: Ashutosh Dixit <[email protected]>

commit 9bf292bfca94694a721449e3fd752493856710f6 upstream.

The MIC VOP driver does two successive reads from user space to read a variable length data structure. Kernel memory corruption can result if the data structure changes between the two reads. This patch disallows the chance of this happening.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116651
Reported by: Pengfei Wang <[email protected]>

---
 drivers/misc/mic/vop/vop_vringh.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/misc/mic/vop/vop_vringh.c +5 -0
@@ -950,6 +950,11 @@ static long vop_ioctl(struct file *f, un
 			ret = -EINVAL;
 			goto free_ret;
 		}
+		/* Ensure desc has not changed between the two reads */
+		if (memcmp(&dd, dd_config, sizeof(dd))) {
+			ret = -EINVAL;
+			goto free_ret;
+		}
 		mutex_lock(&vdev->vdev_mutex);
 		mutex_lock(&vi->vop_mutex);
 		ret = vop_virtio_add_device(vdev, dd_config);

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

queue-4.6/misc-mic-fix-for-double-fetch-security-bug-in-vop-driver.patch