public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* Patch "misc: mic: Fix for double fetch security bug in VOP driver" has been added to the 4.6-stable tree
@ 2016-05-30 20:24 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-05-30 20:24 UTC (permalink / raw)
  To: ashutosh.dixit, gregkh, sudeep.dutt, wpengfeinudt; +Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>From 9bf292bfca94694a721449e3fd752493856710f6 Mon Sep 17 00:00:00 2001
From: Ashutosh Dixit <ashutosh.dixit@intel.com>
Date: Wed, 27 Apr 2016 14:36:05 -0700
Subject: misc: mic: Fix for double fetch security bug in VOP driver

From: Ashutosh Dixit <ashutosh.dixit@intel.com>

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 <wpengfeinudt@gmail.com>
Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/misc/mic/vop/vop_vringh.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/misc/mic/vop/vop_vringh.c
+++ b/drivers/misc/mic/vop/vop_vringh.c
@@ -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 ashutosh.dixit@intel.com are

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-30 20:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-30 20:24 Patch "misc: mic: Fix for double fetch security bug in VOP driver" has been added to the 4.6-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox