From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jacob von Chorus <jacobvonchorus@cwphoto.ca>
Cc: Insop Song <insop.song@gainspeed.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: gs_fpgaboot: add buffer overflow checks
Date: Mon, 17 Jul 2017 14:25:41 +0200 [thread overview]
Message-ID: <20170717122541.GA24503@kroah.com> (raw)
In-Reply-To: <20170717003841.6317-1-jacobvonchorus@cwphoto.ca>
On Sun, Jul 16, 2017 at 08:38:41PM -0400, Jacob von Chorus wrote:
> Four fields in struct fpgaimage are char arrays of length MAX_STR (256).
> The amount of data read into these buffers is controlled by a length
> field in the bitstream file read from userspace. If a corrupt or
> malicious firmware file was supplied, kernel data beyond these buffers
> can be overwritten arbitrarily.
>
> This patch adds a check of the bitstream's length value to ensure it
> fits within the bounds of the allocated buffers. An error condition is
> returned from gs_read_bitstream if any of the reads fail.
>
> This patch also fixes a checkpatch.pl CHECK in io.c by removing the FSF
> address paragraph.
Whenever you have a "also" in a patch changelog, that's a huge flag that
this should be a separate patch. As is the case here, fixing the FSF
address has nothing to do with the buffer overflow checks.
Please break this up into two different patches.
thanks,
greg k-h
next prev parent reply other threads:[~2017-07-17 12:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 0:38 [PATCH] staging: gs_fpgaboot: add buffer overflow checks Jacob von Chorus
2017-07-17 12:25 ` Greg Kroah-Hartman [this message]
2017-07-17 19:53 ` Dan Carpenter
2017-07-18 0:21 ` Jacob von Chorus
2017-07-18 7:54 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2017-07-17 20:05 Jacob von Chorus
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=20170717122541.GA24503@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=insop.song@gainspeed.com \
--cc=jacobvonchorus@cwphoto.ca \
--cc=linux-kernel@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