public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Eric Dumazet <edumazet@google.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH v2] i2c: dev: zero out array used for i2c reads from userspace
Date: Tue, 10 Aug 2021 22:55:11 +0200	[thread overview]
Message-ID: <YRLnr24IBwe5HS+j@kunai> (raw)
In-Reply-To: <20210729143532.47240-1-gregkh@linuxfoundation.org>

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

On Thu, Jul 29, 2021 at 04:35:32PM +0200, Greg Kroah-Hartman wrote:
> If an i2c driver happens to not provide the full amount of data that a
> user asks for, it is possible that some uninitialized data could be sent
> to userspace.  While all in-kernel drivers look to be safe, just be sure
> by initializing the buffer to zero before it is passed to the i2c driver
> so that any future drivers will not have this issue.
> 
> Also properly copy the amount of data recvieved to the userspace buffer,
> as pointed out by Dan Carpenter.
> 
> Reported-by: Eric Dumazet <edumazet@google.com>
> Cc: Dan Carpenter <dan.carpenter@oracle.com>
> Cc: stable <stable@vger.kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Fixed checkpatch warning "WARNING: Invalid email format for stable:
'stable <stable@vger.kernel.org>', prefer 'stable@vger.kernel.org' " and
applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-08-10 20:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29 14:35 [PATCH v2] i2c: dev: zero out array used for i2c reads from userspace Greg Kroah-Hartman
2021-08-10 20:55 ` Wolfram Sang [this message]
2021-08-11  7:29   ` Greg Kroah-Hartman

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=YRLnr24IBwe5HS+j@kunai \
    --to=wsa@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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