Repository navigation
7z: Add native Deflate64 (type 10) support using infback9 - #6058
TrinityBerserker wants to merge 3 commits into
Conversation
|
28 failing checks, 3 successful (only gcc 16) |
|
Thanks for checking the CI, @solardiz. The previous failures were due to the new objects (infback9.o, inftree9.o, infback9_shim.o) not being added to the Makefile.in and Makefile.legacy templates, which caused the build to fail in the CI's clean environments. I've just pushed the fixes for the build system, along with the required zlib headers (zlib.h, zconf.h, zutil.h, gzguts.h). The build passes locally now. Whenever you have a moment, could you approve the CI workflow so we can verify it against the test matrix? Thanks! |
|
CI is happy. Now we need to hear from @magnumripper and we need to process all the rest of open PRs as well... which I have been failing at lately. Also, I wonder if we could possibly want to move the added files to a subdirectory rather than having them right in |
|
Thanks for checking the CI, @solardiz! I'm glad it's passing. Regarding the file organization: I completely agree. Having those files in the root of src/ can get messy. If @magnumripper agrees, I can create a subdirectory (e.g., src/infback9/), move the zlib and infback9 files there, and update the Makefile.in and #include paths. Just let me know what you both decide and I'll implement it. |
This PR adds native Deflate64 (type 10) decompression support to the 7z format using the
infback9implementation from zlib. As discussed in #6056, this allows John to verify the CRC32 of Deflate64-compressed archives, eliminating the need for padding attacks and their associated false positives.Changes:
infback9.c,infback9.h,inftree9.c,inftree9.h,inffix9.h, andinflate9.hinto the JtR source tree.back9_alloc/back9_freememory allocators andback9_in/back9_outcallbacks.src/7z_common_plug.cto acceptc_type == 10and useinflateBack9for decompression.crc_lenandpacked_sizeto prevent DoS from malicious hashes.Testing:
.7zarchive with Deflate64 (7z a -t7z -m0=Deflate64 -p"secret123").Fixes #6056