Bug 473958 (CVE-2008-5078) - CVE-2008-5078 enscript: "epsf" special escape buffer overflows
Summary: CVE-2008-5078 enscript: "epsf" special escape buffer overflows
Alias: CVE-2008-5078
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Whiteboard: source=redhat,reported=20081201,publi...
Keywords: Security
Depends On: 473089 473090 473091 473093
TreeView+ depends on / blocked
Reported: 2008-12-01 16:21 UTC by Tomas Hoger
Modified: 2019-06-08 12:38 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2008-12-19 17:39:29 UTC

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

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2008:1021 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:

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:

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