Patch "misc: mic: double free on ioctl error path" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    misc: mic: double free on ioctl error path

to the 4.9-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-double-free-on-ioctl-error-path.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 816c9311f1144a03da1fdc4feb2f6b0d3299fca0 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date: Mon, 9 Jan 2017 11:20:16 +0300
Subject: misc: mic: double free on ioctl error path

From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

commit 816c9311f1144a03da1fdc4feb2f6b0d3299fca0 upstream.

This function only has one caller.  Freeing "vdev" here leads to a use
after free bug.  There are several other error paths in this function
but this is the only one which frees "vdev".  It looks like the kfree()
can be safely removed.

Fixes: 61e9c905df78 ("misc: mic: Enable VOP host side functionality")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

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

--- a/drivers/misc/mic/vop/vop_vringh.c
+++ b/drivers/misc/mic/vop/vop_vringh.c
@@ -292,7 +292,6 @@ static int vop_virtio_add_device(struct
 	if (ret) {
 		dev_err(vop_dev(vdev), "%s %d err %d\n",
 			__func__, __LINE__, ret);
-		kfree(vdev);
 		return ret;
 	}
 


Patches currently in stable-queue which might be from dan.carpenter@xxxxxxxxxx are

queue-4.9/misc-mic-double-free-on-ioctl-error-path.patch
queue-4.9/drivers-misc-c2port-c2port-duramar2150.c-checking-for-null-instead-of-is_err.patch
queue-4.9/iio-adc-ti_am335x_adc-allocating-too-much-in-probe.patch
queue-4.9/staging-rtl8188eu-prevent-an-underflow-in-rtw_check_beacon_data.patch



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]