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: From Uninitialized Memory to Remote Code Execution

342 pointsby landaveabout 7 years ago

15 comments

landaveabout 7 years ago
There were some misunderstandings that I want to clear up (maybe I will add them in an update to the blog post):<p>1. Some people mentioned that this would &quot;only affect RAR files&quot; and it would be safe to extract 7z files with 7-Zip prior to version 18.05. This is wrong, because 7-Zip detects the file type from the magic numbers at the beginning of the file. So the exploit can be renamed to &#x27;exploit.7z&#x27; and it works just as well.<p>On &#x2F;r&#x2F;sysadmin, someone even mentioned that a temporary solution might be to block RAR files. By the same argument, this is unlikely to be effective.<p>2. Almost all versions prior to 18.05 are affected. I manually checked version 15.05 and 17.01, and they are definitely affected.<p>3. Not only 7-Zip itself is affected, but essentially all software that uses 7z.dll as library to extract files. This includes various anti-virus software. However, exploitation may be more difficult (though not impossible) if ASLR&amp;DEP is properly enabled (on all modules).
评论 #16986240 未加载
评论 #16986292 未加载
评论 #16987182 未加载
评论 #17018959 未加载
Someone1234about 7 years ago
7-Zip needs to start a Go Fund Me or similar for a Code Signing certificate. They&#x27;re like $69-89&#x2F;year, which is expensive, but for such a popular piece of software it would be a nice safety net in case of site compromise.<p>Too bad none of the big CAs have an Open Source&#x2F;Charity program that would provide a Authenticode Certificate for use with that software.
评论 #16986148 未加载
评论 #16986252 未加载
评论 #16988406 未加载
评论 #16986104 未加载
评论 #16986153 未加载
therealmarvabout 7 years ago
My guess: Because 7zip is not a good auto update software (does it even warn if there is a new version?) this security bug is HUGE!<p>Just give you an example: Many Germans think that <a href="http:&#x2F;&#x2F;www.7-zip.de&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.7-zip.de&#x2F;</a> is the official site and you still download 16.04 there.
评论 #16986497 未加载
评论 #16989027 未加载
评论 #16989800 未加载
therealmarvabout 7 years ago
Great, p7zip is also affected according to an earlier article [1] and the last version 16.02 is from 2016 [2]<p>This open source libraries are used everywhere :(<p>[1]: <a href="https:&#x2F;&#x2F;landave.io&#x2F;2018&#x2F;01&#x2F;7-zip-multiple-memory-corruptions-via-rar-and-zip&#x2F;" rel="nofollow">https:&#x2F;&#x2F;landave.io&#x2F;2018&#x2F;01&#x2F;7-zip-multiple-memory-corruptions...</a><p>[2]: <a href="https:&#x2F;&#x2F;sourceforge.net&#x2F;projects&#x2F;p7zip&#x2F;files&#x2F;p7zip&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sourceforge.net&#x2F;projects&#x2F;p7zip&#x2F;files&#x2F;p7zip&#x2F;</a>
评论 #16986482 未加载
wolf550eabout 7 years ago
Is there software running on Linux which is derived from the same source and is also vulnerable?<p>Is this package vulnerable:<p><a href="https:&#x2F;&#x2F;packages.debian.org&#x2F;sid&#x2F;p7zip-rar" rel="nofollow">https:&#x2F;&#x2F;packages.debian.org&#x2F;sid&#x2F;p7zip-rar</a><p><a href="https:&#x2F;&#x2F;packages.ubuntu.com&#x2F;bionic&#x2F;p7zip-rar" rel="nofollow">https:&#x2F;&#x2F;packages.ubuntu.com&#x2F;bionic&#x2F;p7zip-rar</a><p>?
评论 #16987411 未加载
评论 #16988429 未加载
评论 #16988109 未加载
olinguitoabout 7 years ago
Has anyone definitively confirmed that this vulnerability exists in 7-Zip v9.20 (release) through v9.35 (beta)?
nebulous1about 7 years ago
I have always used 7-Zip on Windows. Having done some reading now, the author&#x27;s general attitude towards the tradeoff between security and executable size&#x2F;speed have convinced me to try and not use it in the future. Thankfully I rarely have to use Windows these days.
lengocthuong15about 7 years ago
Hi all, In 18.01 Igor had fixed CVE-2018-5996 with adding some variable like _errorMode or m_TablesOK. And in 18.05 I don&#x27;t see this variables. Igor was replace it by _solidAllowed to fix CVE-2018-10115. Does it fix for both CVE-2018-5996 and CVE-2018-10115? Thank you
评论 #16994743 未加载
eisa01about 7 years ago
Are there any good alternatives to 7-zip we can use instead?
评论 #16990736 未加载
StapleHorseabout 7 years ago
I would never have found out this if it wouldn&#x27;t for this post in HN. So Thanks you for posting.
dsc_about 7 years ago
This is why Cuckoo Sandbox uses sflock (<a href="https:&#x2F;&#x2F;github.com&#x2F;jbremer&#x2F;sflock" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jbremer&#x2F;sflock</a>) :)<p>It sandboxes extraction.
SloopJonabout 7 years ago
I notice that the submission contains a &quot;?hn&quot; query arg, which I&#x27;m pretty sure confuses the dupe detector.
olfactoryabout 7 years ago
Why does anyone use 7-Zip? Does it have any advantages over the more widely used alternatives (tarball and zip)?
评论 #16990417 未加载
评论 #16989512 未加载
评论 #16991969 未加载
评论 #16989479 未加载
visitorabcabout 7 years ago
Since Ubuntu and Debian are affected,so CentOS is affected too?
mraisonabout 7 years ago
Nowadays when that sort of bug is discovered, the question that naturally comes to my mind is &quot;would that have happened if the software were implemented in (safe) Rust&quot;? In that case it looks like the answer is no.<p>Of course 7-zip is much older than Rust so that&#x27;s just a thought experiment.
评论 #16989583 未加载
评论 #16986541 未加载