Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 97547
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Tavis Ormandy (RETIRED) <taviso@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
zlib.cgi.gz testcase 1 application/octet-stream Tavis Ormandy (RETIRED) 2005-06-30 14:19 0000 162 bytes Details
image.png testcase 2 (png) image/png Tavis Ormandy (RETIRED) 2005-06-30 14:20 0000 102 bytes Details
zlib.cgi.gz testcase 1 (cgi script) application/octet-stream Tavis Ormandy (RETIRED) 2005-07-01 02:39 0000 178 bytes Details
testcase.gz testcase 3 (.gz) application/octet-stream Tavis Ormandy (RETIRED) 2005-07-01 04:09 0000 39 bytes Details
zlib.diff proposed patch patch Tavis Ormandy (RETIRED) 2005-07-02 05:19 0000 759 bytes Details | Diff
zlib-1.2.2-r1.ebuild zlib-1.2.2-r1.ebuild text/plain solar 2005-07-02 06:18 0000 1.82 KB Details
zlib-1.2.2-inftrees.patch zlib-1.2.2-inftrees.patch patch solar 2005-07-02 06:20 0000 474 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 97547 depends on: Show dependency tree
Bug 97547 blocks: 98121

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-06-30 14:18 0000
I've discovered a data stream that causes zlib to corrupt an data structure,
resulting in the linked application dumping core.

Upstream contacted, but no reponse, awaiting vendor-sec to suggest alternate
contact address. (note this is totally unrelated to bug 94584 )

------- Comment #1 From Tavis Ormandy (RETIRED) 2005-06-30 14:19:47 0000 -------
Created an attachment (id=62357) [details]
testcase 1

sh cgi script that crashes opera/firefox by sending content-encoding: gzip.

------- Comment #2 From Tavis Ormandy (RETIRED) 2005-06-30 14:20:56 0000 -------
Created an attachment (id=62358) [details]
testcase 2 (png)

png file with a specially crafted IDAT chunk.

------- Comment #3 From Tavis Ormandy (RETIRED) 2005-07-01 02:39:43 0000 -------
Created an attachment (id=62386) [details]
testcase 1 (cgi script)

This should crash any web browser that uses zlib to handle gzip content
encoding. confirmed with dillo, firefox, opera, mozilla.

------- Comment #4 From Tavis Ormandy (RETIRED) 2005-07-01 04:09:21 0000 -------
Created an attachment (id=62396) [details]
testcase 3 (.gz)

specially crafted gzip file that should crash application using gzread()

$ display testcase.gz
Segmentation fault
$ clamscan testcase.gz
Segmentation fault
...etc.

$ MALLOC_CHECK_=1 identify testcase.gz 
malloc: using debugging hooks
*** glibc detected *** malloc: top chunk is corrupt: 0x08075840 ***
*** glibc detected *** free(): invalid pointer: 0x08073c78 ***
Segmentation fault

This looks like it could be exploitable to me, perhaps via sshd and corrupt
chunks of deflated data (although UsePrivilegeSeperation should stop it being
useful) or via web browser, emailed images, and so on.

------- Comment #5 From Tavis Ormandy (RETIRED) 2005-07-02 02:06:14 0000 -------
Contacted Mark Adler, co-author of zlib who says he has forwarded my report to 
the developers mailing list for investigation.

------- Comment #6 From Tavis Ormandy (RETIRED) 2005-07-02 05:19:55 0000 -------
Created an attachment (id=62457) [details]
proposed patch

Mark Adler proposed the attached patch

------- Comment #7 From Sune Kloppenborg Jeppesen 2005-07-02 05:24:33 0000 -------
Vapier/Solar please advise/provide an updated ebuild. 

------- Comment #8 From solar 2005-07-02 06:18:52 0000 -------
Created an attachment (id=62463) [details]
zlib-1.2.2-r1.ebuild

------- Comment #9 From solar 2005-07-02 06:20:36 0000 -------
Created an attachment (id=62464) [details]
zlib-1.2.2-inftrees.patch

Updated patch using diff -u to go along with the updated ebuild

------- Comment #10 From solar 2005-07-02 06:26:40 0000 -------
Due to the nature of this and the testcases, please lets aim for getting this
one 
out on or by Wend Jul 6th

------- Comment #11 From SpanKY 2005-07-02 07:02:06 0000 -------
ive got local zlib ebuilds/patches ready to go ...

------- Comment #12 From solar 2005-07-02 08:27:14 0000 -------
Adding a selected member of releng (kugelfang) to make sure that any 
snapshots are not taken before the final release day.

kugelfang: this is still a confidential bug. 
If you could relay that fact a pretty critcial package bug is about to be fixed 
without sharing too may details to the rest of releng other than it being a core 
system package we would be thankful.

------- Comment #13 From solar 2005-07-02 08:30:33 0000 -------
Anybody here can request CAN assignment please? (jaervosz || taviso)

------- Comment #14 From Danny van Dyk (RETIRED) 2005-07-02 08:38:23 0000 -------
Just talked with plasmaroo. Resnapshotting is no problem, we're still in
prerelease phase. Thanks for letting us know!

------- Comment #15 From Tavis Ormandy (RETIRED) 2005-07-02 08:51:48 0000 -------
zlib author informs me CERT has been notified.

------- Comment #16 From solar 2005-07-02 13:23:13 0000 -------
Colin Percival requested a CVE.

------- Comment #17 From Tavis Ormandy (RETIRED) 2005-07-03 00:32:23 0000 -------
this is CAN-2005-2096

------- Comment #18 From Thierry Carrez (RETIRED) 2005-07-03 02:00:01 0000 -------
Could be exploitable, raising rating.

------- Comment #19 From Sune Kloppenborg Jeppesen 2005-07-03 23:29:09 0000 -------
Arch Security liaisons, please test zlib 1.2.2-r1 and report back on this bug. 
Do NOT commit anything to Portage. 

------- Comment #20 From Markus Rothe 2005-07-04 05:18:12 0000 -------
I get this on ppc64:

$ display image.png
display: Corrupt image `image.png`.
$ 

I think that this correct, so ppc64 could go stable.

------- Comment #21 From Gustavo Zacarias (RETIRED) 2005-07-04 06:31:51 0000 -------
Looks sane on sparc.

------- Comment #22 From Michael Hanselmann (hansmi) (RETIRED) 2005-07-04 11:43:52 0000 -------
Looks good on ppc. Adding KillerFox to CC for testing on hppa (I'm working with
him to test it).

Other than that, why do we have to test such simple patches? Everyone who
understands a bit of C knows that this code won't break on another architecture.
So testing it on one or two would be enough. I know it's policy and such, but
that's just what I think.

------- Comment #23 From René Nussbaumer 2005-07-04 12:28:36 0000 -------
Looks good on hppa.

------- Comment #24 From Danny van Dyk (RETIRED) 2005-07-04 12:44:04 0000 -------
Fine for amd64. gunzip didn't vomit on testcase_3.gz :-)

------- Comment #25 From Tavis Ormandy (RETIRED) 2005-07-06 07:01:39 0000 -------
This is public at 1400UTC today.

------- Comment #26 From Thierry Carrez (RETIRED) 2005-07-06 07:27:48 0000 -------
Public followup on bug 98121
GLSA 200507-05

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug