<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 85: Trailing Fake EOCD Causes Archive to be Interpreted as Empty in unzip 6.0</title><link>https://sourceforge.net/p/infozip/bugs/85/</link><description>Recent changes to 85: Trailing Fake EOCD Causes Archive to be Interpreted as Empty in unzip 6.0</description><atom:link href="https://sourceforge.net/p/infozip/bugs/85/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 24 Mar 2026 17:51:31 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/infozip/bugs/85/feed.rss" rel="self" type="application/rss+xml"/><item><title>#85 Trailing Fake EOCD Causes Archive to be Interpreted as Empty in unzip 6.0</title><link>https://sourceforge.net/p/infozip/bugs/85/?limit=25#0bd8</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hey Ronish&lt;/p&gt;
&lt;p&gt;variations on this issue has been around for a while, but thanks for taking the time to formalise it in a ticket. Last one I heard of was embedding  a complete zip file in the trailing zip comment.&lt;/p&gt;
&lt;p&gt;A use-case where this could be used is where the unzipping code works in streaming mode and walks the local directory entries in turn without bothering about the Central Dirsctory &amp;amp; EOCD. In that case, the standard commandline tools would think this was a zip file with zero entries, but the streaming unzipper would see things differntly.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Marquess</dc:creator><pubDate>Tue, 24 Mar 2026 17:51:31 -0000</pubDate><guid>https://sourceforge.net29c4048c6d5d55b2d71be84270a829698926e4dd</guid></item><item><title>Trailing Fake EOCD Causes Archive to be Interpreted as Empty in unzip 6.0</title><link>https://sourceforge.net/p/infozip/bugs/85/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Severity: Medium (Integrity / Anti-forensics / Parser Differential)&lt;/p&gt;
&lt;p&gt;Affected Software:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Info-ZIP UnZip 6.0 (confirmed)&lt;/li&gt;
&lt;li&gt;Other ZIP parsers using backward EOCD scanning (Python zipfile also affected)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Summary:&lt;br/&gt;
Appending a syntactically valid EOCD record (with zero entries) after the legitimate ZIP archive causes unzip 6.0 to select the fake EOCD during backward scanning.&lt;/p&gt;
&lt;p&gt;This results in the archive being interpreted as empty, despite containing valid files.&lt;/p&gt;
&lt;p&gt;Impact:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Silent data integrity corruption&lt;/li&gt;
&lt;li&gt;Archive appears empty in listing tools&lt;/li&gt;
&lt;li&gt;Enables evasion of detection pipelines&lt;/li&gt;
&lt;li&gt;Enables inconsistent interpretation across tools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Technical Details:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;unzip scans backward for EOCD signature&lt;/li&gt;
&lt;li&gt;It does not enforce that EOCD must terminate the archive&lt;/li&gt;
&lt;li&gt;Appended data is treated as valid search space&lt;/li&gt;
&lt;li&gt;First EOCD encountered is accepted without verifying:&lt;/li&gt;
&lt;li&gt;its relation to actual central directory&lt;/li&gt;
&lt;li&gt;file structure consistency&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Attack Construction:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a valid ZIP archive&lt;/li&gt;
&lt;li&gt;Append arbitrary data after the archive 3. Embed a fake EOCD structure in appended data:&lt;/li&gt;
&lt;li&gt;zero entries&lt;/li&gt;
&lt;li&gt;empty central directory&lt;/li&gt;
&lt;li&gt;Ensure fake EOCD is found before the real EOCD during backward scan&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Observed Behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;unzip -l → reports archive as empty&lt;/li&gt;
&lt;li&gt;zipinfo → shows 0 entries&lt;/li&gt;
&lt;li&gt;actual files remain present in archive&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Expected Behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;EOCD must be validated against:&lt;/li&gt;
&lt;li&gt;archive size boundaries&lt;/li&gt;
&lt;li&gt;central directory location&lt;/li&gt;
&lt;li&gt;EOCD located outside valid archive region should be rejected&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Recommendation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Validate EOCD offset and central directory consistency&lt;/li&gt;
&lt;li&gt;Reject EOCD structures found in trailing data beyond archive bounds&lt;/li&gt;
&lt;li&gt;Enforce stricter structural integrity checks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Disclosure Timeline:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Discovery: 23/03/2026&lt;/li&gt;
&lt;li&gt;Report: 23/03/2026&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ronish Bhatt</dc:creator><pubDate>Tue, 24 Mar 2026 15:09:00 -0000</pubDate><guid>https://sourceforge.net3ac9d9d9f6498ff841ef1aa7d1a39dbaef8fffa1</guid></item></channel></rss>