mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
squashfs: more metadata hardening
Anatoly reports another squashfs fuzzing issue, where the decompression parameters themselves are in a compressed block. This causes squashfs_read_data() to be called in order to read the decompression options before the decompression stream having been set up, making squashfs go sideways. Reported-by: Anatoly Trosinenko <[email protected]> Acked-by: Phillip Lougher <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
527838d470
commit
d512584780
1 changed files with 2 additions and 0 deletions
|
|
@ -167,6 +167,8 @@ int squashfs_read_data(struct super_block *sb, u64 index, int length,
|
|||
}
|
||||
|
||||
if (compressed) {
|
||||
if (!msblk->stream)
|
||||
goto read_failure;
|
||||
length = squashfs_decompress(msblk, bh, b, offset, length,
|
||||
output);
|
||||
if (length < 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue