]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lz4: add overrun checks to lz4_uncompress_unknownoutputsize()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jul 2014 23:06:57 +0000 (16:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jul 2014 01:59:12 +0000 (18:59 -0700)
commitbbd637d4b8700d4eedbd2cb34cdea8b6b69a27f0
tree2e1b5a4f9af01bb1086e32beae506a756f472c23
parentac79fd540a0282460a22955753056c4a636b620b
lz4: add overrun checks to lz4_uncompress_unknownoutputsize()

commit 4a3a99045177369700c60d074c0e525e8093b0fc upstream.

Jan points out that I forgot to make the needed fixes to the
lz4_uncompress_unknownoutputsize() function to mirror the changes done
in lz4_decompress() with regards to potential pointer overflows.

The only in-kernel user of this function is the zram code, which only
takes data from a valid compressed buffer that it made itself, so it's
not a big issue.  But due to external kernel modules using this
function, it's better to be safe here.

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