All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Gabriel Knezek <gabeknez@microsoft.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [EXTERNAL] Re: Potential bug in gpiolib-cdev.c in v1 notification about line info changes
Date: Thu, 17 Jun 2021 08:56:08 +0800	[thread overview]
Message-ID: <20210617005608.GA6358@sol> (raw)
In-Reply-To: <SN4PR2101MB073495FA53DFFDB024AB74CEDA0F9@SN4PR2101MB0734.namprd21.prod.outlook.com>

On Wed, Jun 16, 2021 at 09:24:01PM +0000, Gabriel Knezek wrote:
> > 
> > Looks like a bug to me too - well spotted :(.
> > 
> > > We wanted to get your thoughts on if you feel this is actually a bug, or if we
> > overlooked something.
> > > We're proposing to fix this issue by memsetting the entire structure to zero
> > before calling the conversion routine; if you agree that that's a valid
> > approach, I'm happy to submit an official patch.
> > >
> > 
> > Go for it.
> > I'd zero the padding in the conversion routine myself, but zeroing the whole
> > struct in the same routine as the copy_to_user(), as you suggest, would more
> > clearly demonstrate that it isn't leaking stack.
> 
> Sounds good. I'll send out the patch shortly.
> Do you think I should CC: security@kernel.org on the patch?
> 

Not totally clear on the procedure myself, and give this is a potential
security issue, you probably should've gone there first, or mailed the
maintainers privately rather than going straight to the list?
For that matter, I probably should've replied privately rather than
confirming the bug on the list.  But that horse has bolted.

I'd expect the maintainers to promptly direct the patch to the appropriate
channels, though forwarding a copy to security@kernel.org probably
couldn't hurt.

Thanks again for spotting this one - I'm still kicking myself for
missing it.

Cheers,
Kent.


      reply	other threads:[~2021-06-17  0:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 18:57 Potential bug in gpiolib-cdev.c in v1 notification about line info changes Gabriel Knezek
2021-06-16 10:44 ` Kent Gibson
2021-06-16 21:24   ` [EXTERNAL] " Gabriel Knezek
2021-06-17  0:56     ` Kent Gibson [this message]

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=20210617005608.GA6358@sol \
    --to=warthog618@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=gabeknez@microsoft.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.