Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1561653 > unrolled thread

[PATCH 4.4 24/48] i2c: fix kernel memory disclosure in dev interface

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-01-18 12:40 +0100
Last post2017-01-18 12:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.4 24/48] i2c: fix kernel memory disclosure in dev interface Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-18 12:40 +0100

#1561653 — [PATCH 4.4 24/48] i2c: fix kernel memory disclosure in dev interface

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-01-18 12:40 +0100
Subject[PATCH 4.4 24/48] i2c: fix kernel memory disclosure in dev interface
Message-ID<t0WKS-3x9-15@gated-at.bofh.it>
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Vlad Tsyrklevich <vlad@tsyrklevich.net>

commit 30f939feaeee23e21391cfc7b484f012eb189c3c upstream.

i2c_smbus_xfer() does not always fill an entire block, allowing
kernel stack memory disclosure through the temp variable. Clear
it before it's read to.

Signed-off-by: Vlad Tsyrklevich <vlad@tsyrklevich.net>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/i2c-dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -329,7 +329,7 @@ static noinline int i2cdev_ioctl_smbus(s
 		unsigned long arg)
 {
 	struct i2c_smbus_ioctl_data data_arg;
-	union i2c_smbus_data temp;
+	union i2c_smbus_data temp = {};
 	int datasize, res;
 
 	if (copy_from_user(&data_arg,

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web