[ghostscript] [CVE-2008-0411] buffer overflow in the color space handling code

Bug #196397 reported by disabled.user
252
Affects Status Importance Assigned to Milestone
GS-GPL
Fix Released
Medium
ghostscript (Debian)
Fix Released
Unknown
ghostscript (Fedora)
Fix Released
High
ghostscript (Gentoo Linux)
Fix Released
High
ghostscript (Mandriva)
Unknown
Unknown
ghostscript (Ubuntu)
Fix Released
Undecided
Jamie Strandboge
Dapper
Invalid
Undecided
Unassigned
Edgy
Invalid
Undecided
Unassigned
Feisty
Invalid
Undecided
Unassigned
Gutsy
Fix Released
Undecided
Jamie Strandboge
gs-esp (Ubuntu)
Invalid
Undecided
Unassigned
Dapper
Fix Released
Undecided
Jamie Strandboge
Edgy
Fix Released
Undecided
Jamie Strandboge
Feisty
Fix Released
Undecided
Jamie Strandboge
Gutsy
Invalid
Undecided
Unassigned
gs-gpl (Ubuntu)
Invalid
Undecided
Unassigned
Dapper
Fix Released
Undecided
Jamie Strandboge
Edgy
Fix Released
Undecided
Jamie Strandboge
Feisty
Fix Released
Undecided
Jamie Strandboge
Gutsy
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: gs-gpl

References:
DSA-1510-1 (http://www.debian.org/security/2008/dsa-1510)

Quoting:
"Chris Evans discovered a buffer overflow in the color space handling
code of the Ghostscript PostScript/PDF interpreter, which might result
in the execution of arbitrary code if a user is tricked into processing
a malformed file."

CVE References

Revision history for this message
In , Tomas (tomas-redhat-bugs) wrote :

Chris Evans of Google security team has reported a buffer overflow in
zseticcspace() function in zicc.c. The issue is over-trust of the length of a
postscript array which an attacker can set to an arbitrary length.

This issue can lead to arbitrary code execution.

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

Stack-based buffer overflow in the zseticcspace() function in zicc.c, will result in arbitrary code execution.

Currently under embargo, awaiting upstream patch. The $URL is private.

Revision history for this message
In , Tomas (tomas-redhat-bugs) wrote :

Created attachment 294020
Patch proposed by Werner Fink

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

Tom and Stefan, can you please create an ebuild with the patch applied and attach it to this bug. Do not commit anything to CVS yet as long as this bug is under embargo.

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

Created attachment 143467
ghostscript-8.60-CVE-2008-0411.diff

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

Tom and Stefan, can you please prepare an ebuild so we can test this before Feb. 27?

Revision history for this message
In , pva (pva-gentoo-bugs) wrote :

Created attachment 144554
ghostscript-gnu-8.60.0-r1.ebuild.patch

I'll attach patch's for maintainer and others review. This one is for ghostscript-gnu. Other ghostscript packages will follow as soon as I test them...

Revision history for this message
In , pva (pva-gentoo-bugs) wrote :

Created attachment 144560
ghostscript-esp-8.15.4.ebuild.patch

Patch for ghostscript-esp. Includes lot's of quotations fixes.

Revision history for this message
In , pva (pva-gentoo-bugs) wrote :

Created attachment 144561
ghostscript-gpl-8.61-r2.ebuild.patch

And this is patch for ghostscript-gpl. But note during commit patch itself should go into ghostscript-gpl-8.61-patchset-4.tar.bz2. So this patch is for testing purposes only.

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

Arch Security Liaisons, please test the attached ebuilds and report stable on this bug.

=app-text/ghostscript-esp-8.15.4-r1
Target keywords : "alpha amd64 arm hppa ia64 m68k mips ppc ppc64 release s390 sh sparc x86"

=app-text/ghostscript-gnu-8.60.0-r2
Target keywords : "alpha amd64 arm hppa ia64 ppc ppc64 release sh sparc x86"

=app-text/ghostscript-gpl-8.61-r3
Target keywords : "ppc64 release"

CC'ing current Liaisons:
   alpha : ferdy
   amd64 : welp
    hppa : jer
     ppc : dertobi123
   ppc64 : corsair
 release : pva
   sparc : fmccor
     x86 : opfer

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

Oh, and thanks Peter for preparing the ebuilds and doing some QA on the existing ones.

Revision history for this message
In , jer (jer-gentoo-bugs) wrote :

Both are good for HPPA.

Revision history for this message
In , fauli (fauli-gentoo-bugs) wrote :

(In reply to comment #7)
> Arch Security Liaisons, please test the attached ebuilds and report stable on
> this bug.

There is something wrong with the keywords:
> =app-text/ghostscript-gpl-8.61-r3
> Target keywords : "ppc64 release"

 Especially this one.

Revision history for this message
In , jer (jer-gentoo-bugs) wrote :

(In reply to comment #10)
> (In reply to comment #7)
> > Arch Security Liaisons, please test the attached ebuilds and report stable on
> > this bug.
>
> There is something wrong with the keywords:
> > =app-text/ghostscript-gpl-8.61-r3
> > Target keywords : "ppc64 release"
>
> Especially this one.

Not just that - AFAIK ghostscript-esp is getting dropped somewhere in the future and this bug doesn't have an attachment that patches a ghostscript-esp ebuild.

Also odd is that patch to a few ebuilds were posted instead of the new ebuilds themselves as is common practice.

Revision history for this message
In , fauli (fauli-gentoo-bugs) wrote :

(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #7)
> > > Arch Security Liaisons, please test the attached ebuilds and report stable on
> > > this bug.
> >
> > There is something wrong with the keywords:
> > > =app-text/ghostscript-gpl-8.61-r3
> > > Target keywords : "ppc64 release"
> >
> > Especially this one.
>
> Not just that - AFAIK ghostscript-esp is getting dropped somewhere in the
> future and this bug doesn't have an attachment that patches a ghostscript-esp
> ebuild.

 It does. See comment #5.

> Also odd is that patch to a few ebuilds were posted instead of the new ebuilds
> themselves as is common practice.

 Not that bad.

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

(In reply to comment #10)
> There is something wrong with the keywords:

Yes, sorry. I mixed up gpl and gnu.

=app-text/ghostscript-esp-8.15.4-r1
Target keywords : "alpha amd64 arm hppa ia64 m68k mips ppc ppc64 release s390
sh sparc x86"

=app-text/ghostscript-gnu-8.60.0-r2
Target keywords : "ppc64 release"

=app-text/ghostscript-gpl-8.61-r3
Target keywords : "alpha amd64 arm hppa ia64 ppc ppc64 release sh sparc x86"

Revision history for this message
In , fauli (fauli-gentoo-bugs) wrote :

Ok...-gpl and -esp fine on x86, they survived my stress test with different things on a really huge PostScript file.

Revision history for this message
In , jer (jer-gentoo-bugs) wrote :

(In reply to comment #12)
> It does. See comment #5.

Ow, missed that. Sorry.

> > Also odd is that patch to a few ebuilds were posted instead of the new ebuilds
> > themselves as is common practice.
>
> Not that bad.

It's bad when you require seven people to download and apply three patches individually - it's one more step to perform in testing each of the ebuilds.

Revision history for this message
In , pva (pva-gentoo-bugs) wrote :

Jeroen I didn't knew that and will do next time. Right now I've downloaded 5 patches for shorewall* packages and believe me - patches are not so hard to use ;) Just 2-3 additional commands but they worth it as patch greatly simplify review. If that's necessary I can attach full ebuilds now.

Revision history for this message
In , jer (jer-gentoo-bugs) wrote :

ghostscript-esp is good for HPPA too.

Revision history for this message
In , dertobi123 (dertobi123-gentoo-bugs) wrote :

looks good on ppc ...

Revision history for this message
In , Tomas (tomas-redhat-bugs) wrote :

Chris Evans' advisory is public now, lifting embargo:

http://scary.beasts.org/security/CESA-2008-001.html

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

ghostscript-8.15.4-4.fc7 has been submitted as an update for Fedora 7

Revision history for this message
In , corsair (corsair-gentoo-bugs) wrote :

looks good on ppc64, too.

Revision history for this message
In , fmccor (fmccor-gentoo-bugs) wrote :

ghostscript-gpl-8.61.r2 is good on sparc; the others look good on sparc. I also thought ghostscript-esp was either dying or dead, but it does look good. Why are we keeping it around?

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

ghostscript-8.61-8.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update ghostscript'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-1998

Revision history for this message
In , welp (welp-gentoo-bugs) wrote :

Looks good for amd64 too.

Revision history for this message
In , rbu (rbu-gentoo-bugs) wrote :

This is public now. Peter/Printing, can you commit this to the tree with the stable keywords mentioned here. I can re-cc the missing arches.

Revision history for this message
In , pva (pva-gentoo-bugs) wrote :

Commited in the tree.

Target keywords left:
=app-text/ghostscript-esp-8.15.4-r1: "release, alpha, arm, ia64, m68k, mips, s390, sh"
=app-text/ghostscript-gpl-8.61-r3: "release, alpha, arm, ia64, m68k, sh"

Seems that the only reason to keep app-text/ghostscript-esp in the tree is that mips, s390 and sh still have not keyworded/stabilized app-text/ghostscript-{gpl,gnu}.

Revision history for this message
In , armin76 (armin76-gentoo-bugs) wrote :

alpha/ia64 stable, Robert, i think i told you to cc me on restricted bugs, i hate you now! :P

Revision history for this message
In , rhill (rhill-gentoo-bugs) wrote :

mips is going all ~arch.

Revision history for this message
In , pva (pva-gentoo-bugs) wrote :

Fixed in release snapshot.

Revision history for this message
In , jaervosz (jaervosz-gentoo-bugs) wrote :

Seems ready for GLSA.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

ghostscript-8.61-8.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , tgurr (tgurr-gentoo-bugs) wrote :

Just a note: I committed ghostscript-gpl-8.62 to the tree a few minutes ago which had the fix applied upstream.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

ghostscript-8.15.4-4.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , py (py-gentoo-bugs) wrote :

GLSA 200803-14

Changed in ghostscript:
assignee: nobody → jamie-strandboge
status: New → In Progress
Kees Cook (kees)
Changed in ghostscript:
status: New → Invalid
status: New → Invalid
status: New → Invalid
status: New → Invalid
assignee: nobody → jamie-strandboge
status: Invalid → In Progress
Changed in gs-esp:
status: New → In Progress
status: New → In Progress
status: New → In Progress
status: New → In Progress
status: In Progress → Invalid
Changed in gs-gpl:
status: New → In Progress
status: New → In Progress
status: New → In Progress
status: New → In Progress
status: In Progress → Invalid
status: New → Invalid
Changed in gs-esp:
status: New → Invalid
Changed in gs-gpl:
assignee: nobody → jamie-strandboge
assignee: nobody → jamie-strandboge
assignee: nobody → jamie-strandboge
Changed in gs-esp:
assignee: nobody → jamie-strandboge
assignee: nobody → jamie-strandboge
assignee: nobody → jamie-strandboge
Changed in ghostscript:
status: In Progress → Fix Committed
Changed in gs-esp:
status: In Progress → Fix Committed
status: In Progress → Fix Committed
status: In Progress → Fix Committed
Changed in gs-gpl:
status: In Progress → Fix Committed
status: In Progress → Fix Committed
status: In Progress → Fix Committed
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

ghostscript (8.61.dfsg.1-1ubuntu3) hardy; urgency=low

  * SECURITY UPDATE: buffer overflow in color space handling code
  * debian/patches/31_CVE-2008-0411.dpatch: fix zseticcspace() to perform
    range checks
  * References
    CVE-2008-0411

 -- Jamie Strandboge < <email address hidden>> Tue, 08 Apr 2008 11:58:11 -0400

Changed in ghostscript:
status: In Progress → Fix Released
Revision history for this message
Jamie Strandboge (jdstrand) wrote :
Changed in ghostscript:
status: Fix Committed → Fix Released
Changed in gs-esp:
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
Changed in gs-gpl:
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
Changed in ghostscript:
status: Unknown → Fix Released
Changed in gs-gpl:
status: Unknown → Fix Released
Changed in ghostscript:
status: Unknown → Fix Released
Changed in ghostscript:
status: Unknown → Fix Released
Changed in ghostscript (Gentoo Linux):
importance: Unknown → High
Changed in gs-gpl:
importance: Unknown → Medium
Changed in ghostscript (Fedora):
importance: Unknown → High
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.