From: Peilin Ye <yepeilin.cs@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>,
Dan Carpenter <dan.carpenter@oracle.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel-mentees@lists.linuxfoundation.org,
linux1394-devel@lists.sourceforge.net,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Linux-kernel-mentees] [PATCH] firewire: Prevent kernel-infoleak in ioctl_get_info()
Date: Mon, 27 Jul 2020 11:40:33 -0400 [thread overview]
Message-ID: <20200727154033.GA315469@PWN> (raw)
In-Reply-To: <CAK8P3a3zz-xfz2jwUpEU5R7GyCK735PFQK7OjFmmTESgnSzq=Q@mail.gmail.com>
On Mon, Jul 27, 2020 at 05:35:12PM +0200, Arnd Bergmann wrote:
> On Mon, Jul 27, 2020 at 5:18 PM Peilin Ye <yepeilin.cs@gmail.com> wrote:
> >
> > ioctl_get_info() is copying uninitialized stack memory to userspace due to
> > the compiler not initializing holes in statically allocated structures.
> > Fix it by initializing `event` using memset() in fill_bus_reset_event().
> >
> > Cc: stable@vger.kernel.org
> > Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
> > Suggested-by: Arnd Bergmann <arnd@arndb.de>
> > Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> I would recommend always looking through the git history of the
> file to come up with an appropriate 'Fixes' tag. In this case
>
> $ git log -p --follow drivers/firewire/core-cdev.c
>
> searching for any mention of fill_bus_reset_event leads you to
> commit 344bbc4de14e.
>
> In my ~/.gitconfig I have this alias:
>
> [core]
> abbrev = 12
> [alias]
> fixes = show --format='Fixes: %h (\"%s\")' -s
>
> With something like that, calling 'git fixes 344bbc4de14e' produces
> the line to copy:
>
> Fixes: 344bbc4de14e ("firewire: Generalize get_config_rom to get_info.")
Thank you for the advice! Actually I did all of that (manually...) but
wasn't sure whether I should add it on. I will send a v2 soon, and do so
for future patches.
Thank you,
Peilin Ye
next prev parent reply other threads:[~2020-07-27 15:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 15:15 [Linux-kernel-mentees] [PATCH] firewire: Prevent kernel-infoleak in ioctl_get_info() Peilin Ye
2020-07-27 15:35 ` Arnd Bergmann
2020-07-27 15:40 ` Peilin Ye [this message]
2020-07-27 15:45 ` [Linux-kernel-mentees] [PATCH v2] " Peilin Ye
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=20200727154033.GA315469@PWN \
--to=yepeilin.cs@gmail.com \
--cc=arnd@arndb.de \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=stefanr@s5r6.in-berlin.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