projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a121103
)
i2c: fix kernel memory disclosure in dev interface
author
Vlad Tsyrklevich
<
[email protected]
>
Mon, 9 Jan 2017 15:53:36 +0000
(22:53 +0700)
committer
Wolfram Sang
<
[email protected]
>
Thu, 12 Jan 2017 19:06:10 +0000
(20:06 +0100)
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 <
[email protected]
>
Signed-off-by: Wolfram Sang <
[email protected]
>
Cc:
[email protected]
drivers/i2c/i2c-dev.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/i2c-dev.c
b/drivers/i2c/i2c-dev.c
index 66f323fd39826ebe9a738d55724ee2e124b45419..6f638bbc922db4fd366e1e3dcdd11c8655215622 100644
(file)
--- a/
drivers/i2c/i2c-dev.c
+++ b/
drivers/i2c/i2c-dev.c
@@
-331,7
+331,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,