]> git.baikalelectronics.ru Git - kernel.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>
Thu, 3 Jul 2014 23:12:04 +0000 (16:12 -0700)
commitbb9b4a0741b4f92df270bcdaf3e82e3e4967f1ea
treeccadaf9779f3f84f843c971bba5fe45383be049d
parentbb7ca842bf56a0131bf52dd8f67cb9e857400d16
lz4: add overrun checks to lz4_uncompress_unknownoutputsize()

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