• Greg Kroah-Hartman's avatar
    lz4: add overrun checks to lz4_uncompress_unknownoutputsize() · fac842fd
    Greg Kroah-Hartman authored
    commit 4a3a9904 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: default avatarJan Beulich <JBeulich@suse.com>
    Cc: "Don A. Bailey" <donb@securitymouse.com>
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    fac842fd
lz4_decompress.c 7.83 KB