[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1497897167-14556-99-git-send-email-w@1wt.eu>
Date: Mon, 19 Jun 2017 20:29:57 +0200
From: Willy Tarreau <w@....eu>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
linux@...ck-us.net
Cc: Vlad Tsyrklevich <vlad@...rklevich.net>,
Wolfram Sang <wsa@...-dreams.de>, Willy Tarreau <w@....eu>
Subject: [PATCH 3.10 098/268] i2c: fix kernel memory disclosure in dev interface
From: Vlad Tsyrklevich <vlad@...rklevich.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@...rklevich.net>
Signed-off-by: Wolfram Sang <wsa@...-dreams.de>
Signed-off-by: Willy Tarreau <w@....eu>
---
drivers/i2c/i2c-dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index c3ccdea..fa3ecec 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -328,7 +328,7 @@ static noinline int i2cdev_ioctl_smbus(struct i2c_client *client,
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,
--
2.8.0.rc2.1.gbe9624a
Powered by blists - more mailing lists