TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

7-Zip: Multiple Memory Corruptions via RAR and ZIP

252 pointsby landaveover 7 years ago

11 comments

Klasiasterover 7 years ago
Not turning on standard mitigation techniques because of binary size is one of the strangest reasons I&#x27;ve heard. And then still programming in an unsafe language, quite self-confident for a &quot;humble programmer&quot;.<p><a href="https:&#x2F;&#x2F;www.cs.utexas.edu&#x2F;~EWD&#x2F;transcriptions&#x2F;EWD03xx&#x2F;EWD340.html" rel="nofollow">https:&#x2F;&#x2F;www.cs.utexas.edu&#x2F;~EWD&#x2F;transcriptions&#x2F;EWD03xx&#x2F;EWD340...</a> It has already taught us a few lessons, and the one I have chosen to stress in this talk is the following. We shall do a much better programming job, provided that we approach the task with a full appreciation of its tremendous difficulty, provided that we stick to modest and elegant programming languages, provided that we respect the intrinsic limitations of the human mind and approach the task as Very Humble Programmers.
评论 #16224758 未加载
评论 #16228625 未加载
carussellover 7 years ago
Two comments:<p>The way its written, I first took the mention of finding this &quot;during the analysis of a prominent antivirus product&quot; to mean that you were reverse engineering some AV thing and found that it was scanning for this vulnerability (i.e., to protect against bad archives). After a second read, it seems like maybe not, and that the AV itself re-used parts of 7-zip for its own implementation and was therefore vulnerable itself. Still not sure, though.<p>The way the stylesheet makes the &quot;rendered&quot; form (especially section headings) resemble markdown source is pretty neat.
评论 #16222704 未加载
评论 #16222672 未加载
评论 #16226154 未加载
landaveover 7 years ago
So I just tried to compile 7-Zip with VS2017 and &#x2F;DYNAMICBASE. The main binary 7z.dll is 1,569,792 bytes in total, 9344 bytes (0.595%) of which are used by the relocation table. Enabling stack canaries (&#x2F;GS) gives me a 1,578,496 byte binary (including the relocation table), so another 8704 bytes more.
评论 #16226825 未加载
jwilkover 7 years ago
Timeline with a sane date format:<p>2017-12-29 - Discovery<p>2017-12-29 - Report<p>2017-12-29 - MITRE assigned CVE-2017-17969<p>2018-01-10 - Patched version 7-Zip 18.00 released
评论 #16223727 未加载
评论 #16223395 未加载
评论 #16223470 未加载
ccleveover 7 years ago
Does the most recent version on the 7-Zip website, 18.00 beta, contain the patch? It&#x27;s two weeks old.<p>7-Zip doesn&#x27;t appear to contain an auto-updater or an &quot;update me&quot; button.
评论 #16223570 未加载
评论 #16222945 未加载
yborgover 7 years ago
While this analysis was done for 7zip, I would imagine that pretty much every packaged implementation on any platform would have these issues, since most people do exactly the same thing - reuse the reference implementation.<p>Just checked keka on macOS, and it uses the p7zip code.
equaluniqueover 7 years ago
&gt;If you use Shkarin’s PPMd implementation, I would strongly recommend you to harden it by adding out of bound checks wherever possible, and to make sure the basic model invariants always hold.<p>Sounds like a fun project.
rburhumover 7 years ago
MS COM C++ style coding for those that are interested and curious about all the S_FALSE and STDMETHODIMP macros.
d33over 7 years ago
Why wasn&#x27;t it found with afl-fuzz?
评论 #16222821 未加载
评论 #16222835 未加载
Froyohover 7 years ago
Where do you learn about these things? This all went over my head.
评论 #16225693 未加载
评论 #16225805 未加载
rhabarbaover 7 years ago
Happy to have switched to WinRAR years ago. At least they do QA.
评论 #16223498 未加载
评论 #16223296 未加载
评论 #16223543 未加载