[lkml]   [2017]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] staging: gs_fpgaboot: add buffer overflow checks
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 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.


greg k-h

 \ /
  Last update: 2017-07-17 14:26    [W:0.033 / U:2.072 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site