Patch "hwmon: (ads1015) Fix out-of-bounds array access" has been added to the 3.14-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

    hwmon: (ads1015) Fix out-of-bounds array access

to the 3.14-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:
     hwmon-ads1015-fix-out-of-bounds-array-access.patch
and it can be found in the queue-3.14 subdirectory.

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


>From e981429557cbe10c780fab1c1a237cb832757652 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@xxxxxxxxxx>
Date: Tue, 5 Aug 2014 09:59:49 +0800
Subject: hwmon: (ads1015) Fix out-of-bounds array access

From: Axel Lin <axel.lin@xxxxxxxxxx>

commit e981429557cbe10c780fab1c1a237cb832757652 upstream.

Current code uses data_rate as array index in ads1015_read_adc() and uses pga
as array index in ads1015_reg_to_mv, so we must make sure both data_rate and
pga settings are in valid value range.
Return -EINVAL if the setting is out-of-range.

Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/hwmon/ads1015.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/hwmon/ads1015.c
+++ b/drivers/hwmon/ads1015.c
@@ -212,6 +212,7 @@ static int ads1015_get_channels_config_o
 				dev_err(&client->dev,
 					"invalid gain on %s\n",
 					node->full_name);
+				return -EINVAL;
 			}
 		}
 
@@ -222,6 +223,7 @@ static int ads1015_get_channels_config_o
 				dev_err(&client->dev,
 					"invalid data_rate on %s\n",
 					node->full_name);
+				return -EINVAL;
 			}
 		}
 


Patches currently in stable-queue which might be from axel.lin@xxxxxxxxxx are

queue-3.14/hwmon-sis5595-prevent-overflow-problem-when-writing-large-limits.patch
queue-3.14/hwmon-ads1015-fix-off-by-one-for-valid-channel-index-checking.patch
queue-3.14/hwmon-lm78-fix-overflow-problems-seen-when-writing-large-temperature-limits.patch
queue-3.14/hwmon-gpio-fan-prevent-overflow-problem-when-writing-large-limits.patch
queue-3.14/hwmon-amc6821-fix-possible-race-condition-bug.patch
queue-3.14/hwmon-ads1015-fix-out-of-bounds-array-access.patch
queue-3.14/hwmon-dme1737-prevent-overflow-problem-when-writing-large-limits.patch
queue-3.14/hwmon-lm85-fix-various-errors-on-attribute-writes.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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