[U-Boot] [U-Boot, v2, 01/12] lzma: fix buffer bound check error further

Tom Rini trini at ti.com
Thu Jan 15 15:57:37 CET 2015


On Tue, Dec 02, 2014 at 01:17:29PM -0700, Simon Glass wrote:

> Commit 4d3b8a0d fixed a problem with lzma decompress where it would
> run out of bytes to decompress. The algorithm needs to know how many
> uncompressed bytes it is expected to produce.
> 
> However, the fix introduced a potential buffer overrun, and causes
> the compression test to fail (test_compression command in sandbox).
> 
> The correct fix seems to be to use the minimum of the expected number
> of uncompressed bytes and the amount of output space available. That
> way things work normally when there is enough space, and return an
> error (without overrunning available space) when there is not.
> 
> Signed-off-by: Antonios Vamporakis <ant at area128.com>
> CC: Kees Cook <keescook at chromium.org>
> CC: Simon Glass <sjg at chromium.org>
> CC: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
> CC: Luka Perkov <luka at openwrt.org>
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150115/d318f951/attachment.pgp>


More information about the U-Boot mailing list