From: Mark Wielaard <mark@klomp.org>
To: bzip2-devel@sourceware.org
Cc: "Cedric Buissart" <cbuissar@redhat.com>,
"Jakub Martiško" <jamartis@redhat.com>,
"Armin Kuster" <akuster@mvista.com>,
"Mark Wielaard" <mark@klomp.org>
Subject: [PATCH] bzip2recover: Fix use after free issue with outFile.
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <1561330775-17190-1-git-send-email-mark@klomp.org> (raw)
Hi,
bzip2 lost its domain and got a new home at https://sourceware.org/bzip2/
It also didn't see a release for a very long time. Causing various patches
used by distros to not have been integrated upstream. We are trying to
collect them all and do a new release.
The following patch comes from Fedora.
Please let us know if we missed some others.
Thanks,
Mark
bzip2recover.c (main): Make sure to set outFile to NULL when done.
This was reported as CVE-2016-3189 and found in multiple distributions.
https://seclists.org/oss-sec/2016/q2/568
Some more analysis can be found in:
https://bugzilla.redhat.com/show_bug.cgi?id=1319648
---
bzip2recover.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bzip2recover.c b/bzip2recover.c
index 1a70e04..a955d60 100644
--- a/bzip2recover.c
+++ b/bzip2recover.c
@@ -458,6 +458,7 @@ Int32 main ( Int32 argc, Char** argv )
bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
bsPutUInt32 ( bsWr, blockCRC );
bsClose ( bsWr );
+ outFile = NULL;
}
if (wrBlock >= rbCtr) break;
wrBlock++;
--
1.8.3.1
reply other threads:[~2019-06-23 22:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1561330775-17190-1-git-send-email-mark@klomp.org \
--to=mark@klomp.org \
--cc=akuster@mvista.com \
--cc=bzip2-devel@sourceware.org \
--cc=cbuissar@redhat.com \
--cc=jamartis@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).