lkml.org 
[lkml]   [2017]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 221/370] i2c: fix kernel memory disclosure in dev interface
    3.16.42-rc1 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: Ben Hutchings <ben@decadent.org.uk>
    ---
    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
    @@ -334,7 +334,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,
    \
     
     \ /
      Last update: 2017-03-10 13:18    [W:4.121 / U:0.456 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site