lz4: ensure length does not wrap
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Jun 2014 05:01:41 +0000 (22:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2014 19:17:36 +0000 (15:17 -0400)
commit80fdb886fefbc782195ed2c0bd757ea202e05953
tree59d34824449148752568930cf59efc5a4f470b9c
parent0cd8f4b67f78f0b85b019ecfeb6e3ca7a28c109f
lz4: ensure length does not wrap

commit 206204a1162b995e2185275167b22468c00d6b36 upstream.

Given some pathologically compressed data, lz4 could possibly decide to
wrap a few internal variables, causing unknown things to happen.  Catch
this before the wrapping happens and abort the decompression.

Reported-by: "Don A. Bailey" <donb@securitymouse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/lz4/lz4_decompress.c