<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to patches</title><link>https://sourceforge.net/p/p7zip/patches/</link><description>Recent changes to patches</description><atom:link href="https://sourceforge.net/p/p7zip/patches/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 03 Oct 2024 06:31:09 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/p7zip/patches/feed.rss" rel="self" type="application/rss+xml"/><item><title>7z wrapper in /usr/bin jeopardizing the effort to hide password from commandline parameters</title><link>https://sourceforge.net/p/p7zip/patches/38/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
this has been already reported to Fedora package:&lt;br/&gt;
&lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=2316073" rel="nofollow"&gt;https://bugzilla.redhat.com/show_bug.cgi?id=2316073&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;the 7z (/usr/libexec/p7zip/7z) is trying to clear the password from the process command attributes as soon as it is not needed anymore. &lt;br/&gt;
Unfortunately in Fedora we have a wrapper /usr/bin/7z which is doing nothing else than executing /usr/libexec/p7zip/7z , which will still reveal the password.&lt;/p&gt;
&lt;p&gt;Running for example:&lt;br/&gt;
7z a test.7z test.dd -mx=9 -ppassword123&lt;/p&gt;
&lt;p&gt;Will result in this process listing:&lt;br/&gt;
rebus  2713410  0.0  0.0 228500  3612 pts/24   S+   10:45   0:00 /usr/bin/sh /usr/bin/7z a test.7z test.dd -mx=9 -ppassword123&lt;br/&gt;
rebus  2713411  121  0.4 1079920 154904 pts/24 R+   10:45   0:08 /usr/libexec/p7zip/7z a test.7z test.dd -mx=9 -p&lt;strong&gt;&lt;em&gt;*&lt;/em&gt;&lt;/strong&gt;****&lt;/p&gt;
&lt;p&gt;Possible solutions:&lt;br/&gt;
1) using the wrapper with a "exec statement to replace the current process"&lt;br/&gt;
2) use just a link file&lt;br/&gt;
3) compile the 7z in such a way that it can be placed directly to /usr/bin/7z and search the 7z.so in some expectable library location&lt;/p&gt;
&lt;p&gt;As using the link file would break 7z, and changing the 7z location needs much more work on the code, I guess using the exec is the right way to go.&lt;/p&gt;
&lt;p&gt;The usr/bin/7z should read like this:&lt;/p&gt;
&lt;h1 id="usrbinsh"&gt;!/usr/bin/sh&lt;/h1&gt;
&lt;p&gt;exec "/usr/libexec/p7zip/7z" "$@"&lt;/p&gt;
&lt;p&gt;Reproducible: Always&lt;/p&gt;
&lt;p&gt;Steps to Reproduce:&lt;br/&gt;
1. run in one terminal this loop &lt;br/&gt;
while true ; do ps aux|grep -e '&lt;span&gt;[7]&lt;/span&gt;z' ; done | less&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;prepare some reasonably big file&lt;br/&gt;
dd if=/dev/zero of=test.dd bs=1M count=100&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;try to zip the file with password &lt;br/&gt;
7z a test.7z test.dd -mx=9 -ppassword123&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Actual Results:&lt;br/&gt;
rebus  2713410  0.0  0.0 228500  3612 pts/24   S+   10:45   0:00 /usr/bin/sh /usr/bin/7z a test.7z test.dd -mx=9 -ppassword123&lt;br/&gt;
rebus  2713411  121  0.4 1079920 154904 pts/24 R+   10:45   0:08 /usr/libexec/p7zip/7z a test.7z test.dd -mx=9 -p&lt;strong&gt;&lt;em&gt;*&lt;/em&gt;&lt;/strong&gt;****&lt;/p&gt;
&lt;p&gt;Expected Results:&lt;br/&gt;
rebus  2713411  121  0.4 1079920 154904 pts/24 R+   10:45   0:08 /usr/libexec/p7zip/7z a test.7z test.dd -mx=9 -p&lt;strong&gt;&lt;em&gt;*&lt;/em&gt;&lt;/strong&gt;****&lt;/p&gt;
&lt;p&gt;-------------------- cut here -------------&lt;br/&gt;
For completenes&lt;br/&gt;
Using link file results in this error:&lt;br/&gt;
sudo rm /usr/bin/7z&lt;br/&gt;
sudo ln -s /usr/libexec/p7zip/7z /usr/bin/7z&lt;br/&gt;
$ 7z a test.7z test.dd -mx=9 -ppassword123&lt;/p&gt;
&lt;p&gt;7-Zip &lt;span&gt;[64]&lt;/span&gt; 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21&lt;br/&gt;
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz (806EC),ASM,AES-NI)&lt;/p&gt;
&lt;p&gt;Can't load './7z.dll' (./7z.so: cannot open shared object file: No such file or directory)&lt;/p&gt;
&lt;p&gt;ERROR:&lt;br/&gt;
7-Zip cannot find the code that works with archives.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michal Ambroz</dc:creator><pubDate>Thu, 03 Oct 2024 06:31:09 -0000</pubDate><guid>https://sourceforge.net546cb63e6d4c9cc78f3b5aa1ff3958682ceb802f</guid></item><item><title>#30 p7zip fails to decompress valid bzip2 file</title><link>https://sourceforge.net/p/p7zip/patches/30/?limit=25#679d</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Out of curiosity where did you find that? I mean bzip2 1.0.6 is like 10 yeayrs old and lbzip2 was in craddle back then...&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sam Tansy</dc:creator><pubDate>Fri, 08 May 2020 14:00:01 -0000</pubDate><guid>https://sourceforge.neta02c073e3547d88c0ccb04b926df4278bb569f01</guid></item><item><title>#30 p7zip fails to decompress valid bzip2 file</title><link>https://sourceforge.net/p/p7zip/patches/30/?limit=25#0ec7</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The things are more complcated.&lt;br/&gt;
There was old bug in bzip2 code.&lt;br/&gt;
lbzip2 used that bug for some extra features.&lt;br/&gt;
Then the bug was fixed in bzip2, but they extended the decoder to support extended archives created by lbzip2.&lt;br/&gt;
But they extended bzip2 decoder even more than required by lbzip2. So now bzip2 decoder is super extended, and that over-lbzip2 is not supported by current 7zip.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor Pavlov</dc:creator><pubDate>Fri, 08 May 2020 10:07:51 -0000</pubDate><guid>https://sourceforge.net3ba794cdceebd553845731f4331b95b19cc21ed6</guid></item><item><title>#30 p7zip fails to decompress valid bzip2 file</title><link>https://sourceforge.net/p/p7zip/patches/30/?limit=25#bfbc</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;It is artificial file but rationale behind that was that lbzip2 allows 18008 MFT selectors&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="o"&gt;@&lt;/span&gt; &lt;span class="n"&gt;LBZIP2_SRC&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;c&lt;/span&gt;
  &lt;span class="k"&gt;union&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;struct&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;uint8_t&lt;/span&gt; &lt;span class="n"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;18000&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
      &lt;span class="n"&gt;uint8_t&lt;/span&gt; &lt;span class="n"&gt;selectorMTF&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;18000&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
      &lt;span class="n"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;num_selectors&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;num_trees&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;when bzip2 format 18002&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="o"&gt;@&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;BZIP2_SRC&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bzlib_private&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;
&lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="n"&gt;define&lt;/span&gt; &lt;span class="n"&gt;BZ_G_SIZE&lt;/span&gt;   &lt;span class="mi"&gt;50&lt;/span&gt;
&lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="n"&gt;define&lt;/span&gt; &lt;span class="n"&gt;BZ_MAX_SELECTORS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;900000&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;BZ_G_SIZE&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;As &lt;a class="" href="https://sourceware.org/pipermail/bzip2-devel/2019q1/000071.html" rel="nofollow"&gt;said&lt;/a&gt; before:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The nSelectors relaxation is probably something we want to get out asap, so&lt;br/&gt;
people can unbzip2 all files again they could before (even if they were&lt;br/&gt;
technically "broken").&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It's a question to lzbip2 devs why they violated format rather than to bzip2 team.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sam Tansy</dc:creator><pubDate>Fri, 08 May 2020 04:54:48 -0000</pubDate><guid>https://sourceforge.netaeac6ab9a3a6981394db8d12daf24a0cd50b944e</guid></item><item><title>#30 p7zip fails to decompress valid bzip2 file</title><link>https://sourceforge.net/p/p7zip/patches/30/?limit=25#bc3e</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;So is it artificial file?&lt;br/&gt;
Actually I don't like that code in Bzip2-1.0.8 decoder, but if it allows such archives, maybe 7-Zip also can allow it.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor Pavlov</dc:creator><pubDate>Fri, 01 May 2020 11:24:07 -0000</pubDate><guid>https://sourceforge.net8530899f6630f5105263c33a4563b22c0f28db53</guid></item><item><title>#30 p7zip fails to decompress valid bzip2 file</title><link>https://sourceforge.net/p/p7zip/patches/30/?limit=25#0bf8</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I know it was long time ago but as this is still an issue I will try to upload it. This script is given in a way that is not exactly easy to decode.&lt;br/&gt;
Here is base64 encoded payload.bz2.gz:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;PAK&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="ss"&gt;"H4sIAAAAAAACA3OKyrA0dIxUC460+znBh4GByY2BQYCJgYdB//8DhuEORsEoGAWjYBSMglEw\&lt;/span&gt;
&lt;span class="ss"&gt;CkbBKBgFo2AUjIJRwJa54KxJWpzek66ChQq1nxVmAABZl5ZRLBAAAA=="&lt;/span&gt;

&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;PAK&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;base64&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;gzip&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;dc&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bz2&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;To decode it one needs run above script or download and gunzip attachment.&lt;/p&gt;
&lt;p&gt;@&lt;a class="" href="https://sourceforge.net/u/robld/"&gt;Robert Luberda&lt;/a&gt;: I'm not sure whether simply allowing 32767 as they are not going to be used in format anyway.Bip2-1.0.8 alows them but discards excess (&lt;a class="" href="https://sourceware.org/pipermail/bzip2-devel/2019q1/000071.html" rel="nofollow"&gt;1.0.8 release&lt;/a&gt;) but this belongs to devs.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sam Tansy</dc:creator><pubDate>Tue, 28 Apr 2020 11:48:49 -0000</pubDate><guid>https://sourceforge.netcff7978dfefd981d470bf15a3e7766b42e27bada</guid></item><item><title>#37 interest in oss-fuzz?</title><link>https://sourceforge.net/p/p7zip/patches/37/?limit=25#6a59</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Sorry, should clearly say "p7zip" not "ossec-hids"... I'm making this offer to a few projects!&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Berkeley Churchill</dc:creator><pubDate>Sat, 21 Dec 2019 05:50:46 -0000</pubDate><guid>https://sourceforge.net1ec849ac5fb37ab6a82430911998cafbae4b4e48</guid></item><item><title>interest in oss-fuzz?</title><link>https://sourceforge.net/p/p7zip/patches/37/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;OSS Fuzz is a google project that supports open source projects by fuzzing. It allows Google to find and report bugs, especially security bugs, to the project. I'm willing to work on writing fuzzers for ossec-hids and integrating with oss-fuzz, if this would be welcome by the maintainers.  You would see me writing some fuzzing harnesses and making pull requests to merge them in to the project, and a few regression tests to make sure that the fuzzing harnesses are working properly.  Then, you would get reports from google with anything the fuzzer finds.&lt;/p&gt;
&lt;p&gt;Is this something that would be welcome for this project?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Berkeley Churchill</dc:creator><pubDate>Sat, 21 Dec 2019 05:45:21 -0000</pubDate><guid>https://sourceforge.net5fe745c0cb55607d410e85830ce8f045411ceb86</guid></item><item><title>#36 Fix archivers/p7zip endianness detection</title><link>https://sourceforge.net/p/p7zip/patches/36/?limit=25#bfeb</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;As I suppose they made some changes in some old version of p7zip, but later they have discovered the problem. So they wrote another patch for another patched version?&lt;br/&gt;
But original p7zip 16.02 must work OK as I suppose.&lt;br/&gt;
CpuArch.h is used in Windows and in Posix. Why to link some external  &amp;lt;endian.h&amp;gt;, if averything works ok without that &amp;lt;endian.h&amp;gt;?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor Pavlov</dc:creator><pubDate>Sat, 12 Aug 2017 16:54:32 -0000</pubDate><guid>https://sourceforge.netc0a979122a160f28ea30014cd194fe788858b55d</guid></item><item><title>Fix archivers/p7zip endianness detection</title><link>https://sourceforge.net/p/p7zip/patches/36/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Patch to replace the architecture list with &amp;lt;endian.h&amp;gt; developed by Donovan Watteau.  Discussion thread on the OpenBSD ports@ mailing list begins &lt;a class="" href="http://marc.info/?l=openbsd-ports&amp;amp;m=149899216311747&amp;amp;w=2" rel="nofollow"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Josh</dc:creator><pubDate>Sat, 12 Aug 2017 10:41:12 -0000</pubDate><guid>https://sourceforge.net846aec44f8a801cfbde9a747b101e4069073c093</guid></item></channel></rss>