From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:52043 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161893AbcE3Ub6 (ORCPT ); Mon, 30 May 2016 16:31:58 -0400 Subject: Patch "misc: mic: Fix for double fetch security bug in VOP driver" has been added to the 4.6-stable tree To: ashutosh.dixit@intel.com, gregkh@linuxfoundation.org, sudeep.dutt@intel.com, wpengfeinudt@gmail.com Cc: , From: Date: Mon, 30 May 2016 13:24:16 -0700 Message-ID: <146463985689160@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 9bf292bfca94694a721449e3fd752493856710f6 Mon Sep 17 00:00:00 2001 From: Ashutosh Dixit Date: Wed, 27 Apr 2016 14:36:05 -0700 Subject: misc: mic: Fix for double fetch security bug in VOP driver From: Ashutosh Dixit 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 Reviewed-by: Sudeep Dutt Signed-off-by: Ashutosh Dixit Signed-off-by: Greg Kroah-Hartman --- 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