From: Phillip Lougher Date: Tue, 15 Mar 2011 22:09:55 +0000 (+0000) Subject: Squashfs: handle corruption of directory structure X-Git-Tag: v2.6.39-rc1~94^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44cff8a9ee8a974f9e931df910688e7fc1f0b0f9;p=pandora-kernel.git Squashfs: handle corruption of directory structure Handle the rare case where a directory metadata block is uncompressed and corrupted, leading to a kernel oops in directory scanning (memcpy). Normally corruption is detected at the decompression stage and dealt with then, however, this will not happen if: - metadata isn't compressed (users can optionally request no metadata compression), or - the compressed metadata block was larger than the original, in which case the uncompressed version was used, or - the data was corrupt after decompression This patch fixes this by adding some sanity checks against known maximum values. Signed-off-by: Phillip Lougher --- Reading git-diff-tree failed