diff options
author | Grzegorz Antoniak <ga@anadoxin.org> | 2019-09-27 07:38:58 +0200 |
---|---|---|
committer | Grzegorz Antoniak <ga@anadoxin.org> | 2019-09-27 19:51:32 +0200 |
commit | b09d86145ff02a85b603c54a7e188513d7c2bc4f (patch) | |
tree | dd7f836c41350a3f7e06b95a96203a7741c79cf6 /Makefile.am | |
parent | 2f3033ca23f8c21160506c3c7ac8a0df0d3fde42 (diff) | |
download | libarchive-b09d86145ff02a85b603c54a7e188513d7c2bc4f.tar.gz |
RAR5 reader: verify window size for solid files
RAR5 archives can contain files compressed independently of each other,
and files that share a common window buffer, so files which are
compressed using 'solid' method. In the latter case, all files
are required to use the same window buffer, so window size should also
be the same.
OSSFuzz sample #15482 declares a different window size for multiple
solid files. RAR5 reader doesn't reallocate window buffer when
decompressing solid files, so it was possible to perform an
out-of-bounds read by declaring two solid files, where the second solid
file declared the window size parameter that was bigger than window size
used in first solid file.
This commit introduces additional checks to ensure all solid files are
using the same window size.
The commit also adds a test case using OSSFuzz sample #15482 to hunt
down regressions in the future.
Some other test cases had to be adjusted as well, because other OSSFuzz
samples were also declaring different window sizes for solid files. So
this commit has changed the error reporting for those invalid sample files.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 20eb5312..03805b4b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -835,6 +835,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_rar5_blake2.rar.uu \ libarchive/test/test_read_format_rar5_compressed.rar.uu \ libarchive/test/test_read_format_rar5_different_window_size.rar.uu \ + libarchive/test/test_read_format_rar5_different_solid_window_size.rar.uu \ libarchive/test/test_read_format_rar5_distance_overflow.rar.uu \ libarchive/test/test_read_format_rar5_extra_field_version.rar.uu \ libarchive/test/test_read_format_rar5_fileattr.rar.uu \ |