Re: lz4: fix system halted at boot kernel x86_64 compressed lz4
From: David Sterba
Date: Tue Mar 24 2015 - 20:45:11 EST
On Tue, Mar 24, 2015 at 12:27:25PM +0100, Krzysztof Kolasa wrote:
> lz4: fix system halted at boot kernel x86_64 compressed lz4
>
> Decompression process ends with an error when loading kernel:
>
> Decoding failed
> -- System halted
Serious regression detected ...
>
> This condition is probably not needed ( from the last commit d5e7caf) :
The offending patch is on the way to stable trees, so it would be best
to postpone it for now.
> if( ... ||
> (op + COPYLENGTH) > oend)
> goto _output_error
>
> macro LZ4_SECURE_COPY() tests op and does not copy any data
> when op exceeds the value, decompression process is continued.
>
> added by analogy security for the ref:
>
> if ((ref + COPYLENGTH) > oend...
>
> to lz4_uncompress_unknownoutputsize(...)
I did only a quick check, your analysis seems correct. Reviewing the lz4
patches is tedious as the kernel implementations do not match the
upstream one line-by-line besides that I've missed the side effects of
the macro.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/