Bug 473958 (CVE-2008-5078) - CVE-2008-5078 enscript: "epsf" special escape buffer overflows
Summary: CVE-2008-5078 enscript: "epsf" special escape buffer overflows
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2008-5078
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 473089 473090 473091 473093
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-01 16:21 UTC by Tomas Hoger
Modified: 2019-09-29 12:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-19 17:39:29 UTC
Embargoed:


Attachments (Terms of Use)
Patch for enscript 1.6.1 for CVE-2008-3863, CVE-2008-4306 and CVE-2008-5078 (7.95 KB, patch)
2008-12-01 16:29 UTC, Tomas Hoger
no flags Details | Diff
Improved patch (8.37 KB, patch)
2008-12-04 15:51 UTC, Adam Tkac
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2008:1021 0 normal SHIPPED_LIVE Moderate: enscript security update 2008-12-15 15:01:29 UTC

Description Tomas Hoger 2008-12-01 16:21:50 UTC
While preparing updates for CVE-2008-3863 and CVE-2008-4306, we have discovered that enscript 1.6.1 (and possibly earlier versions) is affected by similar flaws affecting handling of epsf special escape.

Long file name specified as an argument for epsf special escape can cause buffer overflow in recognize_eps_file() in src/psgen.c, or in tilde_subst() in src/util.c due to unsafe use of strcpy or sprintf.

Identified flaws do not affect enscript 1.6.4.

Comment 1 Tomas Hoger 2008-12-01 16:29:05 UTC
Created attachment 325251 [details]
Patch for enscript 1.6.1 for CVE-2008-3863, CVE-2008-4306 and CVE-2008-5078

It also prevents few command line arguments parsing overflow, but those are not security flaws (no trust boundary crossed).

Comment 3 Adam Tkac 2008-12-04 15:51:14 UTC
Created attachment 325695 [details]
Improved patch

Comment 4 Tomas Hoger 2008-12-15 13:39:11 UTC
Lifting embargo.

Comment 5 Red Hat Product Security 2008-12-19 17:39:29 UTC
This issue was addressed in:

Red Hat Enterprise Linux:
  http://rhn.redhat.com/errata/RHSA-2008-1021.html

Comment 6 Marcus Meissner 2009-02-20 10:58:00 UTC
reading the manpage ... why not just pipe a shell command in @epsf{reboot|} ... 

fixing just the buffer overflow is a bit stupid ;)

Comment 7 Tomas Hoger 2009-02-20 11:14:32 UTC
(In reply to comment #6)
> reading the manpage ... why not just pipe a shell command in @epsf{reboot|} ... 

Because that is denied for quite a long time, at least in all RHEL and Fedora packages:
http://cvs.fedoraproject.org/viewvc/rpms/enscript/devel/enscript-1.6.1-CAN-2004-1185.patch?view=markup


Note You need to log in before you can comment on or make changes to this bug.