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>
Mon, 23 Jun 2014 18:12:01 +0000 (14:12 -0400)
commit206204a1162b995e2185275167b22468c00d6b36
treef09cf353e088f94a0b18b39528e486d350d18919
parent206a81c18401c0cde6e579164f752c4b147324ce
lz4: ensure length does not wrap

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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/lz4/lz4_decompress.c