Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1568204
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.12 159/235] i2c: fix kernel memory disclosure in dev interface |
| Date | 2017-01-27 12:40 +0100 |
| Message-ID | <t4d2P-3w5-33@gated-at.bofh.it> (permalink) |
| References | <t4cq5-32y-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Vlad Tsyrklevich <vlad@tsyrklevich.net>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
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: Jiri Slaby <jslaby@suse.cz>
---
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 c3ccdea3d180..fa3ecec524fa 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.11.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.12 159/235] i2c: fix kernel memory disclosure in dev interface Jiri Slaby <jslaby@suse.cz> - 2017-01-27 12:40 +0100
csiph-web