Patch "device property: fix potential NULL pointer dereference" has been added to the 4.1-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
device property: fix potential NULL pointer dereference
to the 4.1-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:
device-property-fix-potential-null-pointer-dereference.patch
and it can be found in the queue-4.1 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
ecc87eed7beeb50c0be0b73322d62135277ea2b0Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <[email protected]>
Date: Wed, 5 Aug 2015 16:51:11 +0300
Subject: device property: fix potential NULL pointer dereference
From: Andy Shevchenko <[email protected]>
commit ecc87eed7beeb50c0be0b73322d62135277ea2b0 upstream.
In device_add_property_set() we check pset parameter for a NULL, but few lines later we do a pointer arithmetic without check that will crash kernel in the set_secondary_fwnode().
Here we check if pset parameter is NULL and return immediately.
--- drivers/base/property.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/base/property.c +3 -2
@@ -26,9 +26,10 @@*/ void device_add_property_set (struct device *dev,struct property_set *pset) { -if (pset) - pset->fwnode.type =FWNODE_PDATA ; +if (!pset) +return ; + pset->fwnode.type =FWNODE_PDATA ;set_secondary_fwnode (dev, &pset->fwnode); }EXPORT_SYMBOL_GPL (device_add_property_set);
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/dmaengine-dw-properly-read-dwc_params-register.patch queue-4.1/device-property-fix-potential-null-pointer-dereference.patch