From: jeremy.compostella@intel.com (Compostella, Jeremy)
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA
Date: Mon, 27 Nov 2017 12:14:22 -0700 [thread overview]
Message-ID: <87mv37pm9d.fsf@jcompost-mobl.amr.corp.intel.com> (raw)
In-Reply-To: <20171127183847.ddatx2r5dnmrs3rl@ninjato> (Wolfram Sang's message of "Mon, 27 Nov 2017 19:38:47 +0100")
Wolfram Sang <wsa@the-dreams.de> writes:
> On Wed, Nov 15, 2017 at 12:54:09PM -0700, Compostella, Jeremy wrote:
> > On a I2C_SMBUS_I2C_BLOCK_DATA read request, if data->block[0] is
> > greater than I2C_SMBUS_BLOCK_MAX + 1, the underlying I2C driver writes
> > data out of the msgbuf1 boundary.
> >
> > It is possible from a user application to run into that issue by call
> > the I2C_SMBUS ioctl with data.block[0] greater than
> > I2C_SMBUS_BLOCK_MAX + 1.
> From Documentation/i2c/dev-interface:
> ioctl(file, I2C_SMBUS, struct i2c_smbus_ioctl_data *args)
> Not meant to be called directly; instead, use the access functions
> below.
> Maybe we should add this info to the include file as well?
> But I guess we still shouldn't OOPS on this misuse...
I read that part of the documentation too. But still, I really think
this is an issue as there should not exist a so easy to corrupt the
Kernel stack.
Thanks,
Jeremy
next prev parent reply other threads:[~2017-11-27 19:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 19:54 [PATCH] i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA Compostella, Jeremy
2017-11-27 18:38 ` Wolfram Sang
2017-11-27 19:14 ` Compostella, Jeremy [this message]
2018-01-15 17:59 ` Wolfram Sang
2018-01-16 19:42 ` Compostella, Jeremy
2018-01-17 14:37 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mv37pm9d.fsf@jcompost-mobl.amr.corp.intel.com \
--to=jeremy.compostella@intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox