Bug 726426 - (CVE-2011-2923, CVE-2011-2924) CVE-2011-2923 CVE-2011-2924 foomatic: foomatic-rip (debug mode) insecure temporary file use in renderer command line by processing PostScript data
CVE-2011-2923 CVE-2011-2924 foomatic: foomatic-rip (debug mode) insecure temp...
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20110728,reported=2...
: Security
Depends On: 726432
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-28 10:49 EDT by Jan Lieskovsky
Modified: 2016-03-04 05:41 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-22 11:19:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Lieskovsky 2011-07-28 10:49:45 EDT
It was found that foomatic-rip filter used insecurely created temporary file for storage of PostScript data by rendering the data, intended to be sent to the PostScript filter, when the debug mode was enabled. A local attacker could use this flaw to conduct symlink attacks (overwrite arbitrary file accessible with the privileges of the user running the foomatic-rip universal print filter).

Relevant source code part (Perl script part / foomatic-rip.in):
===============================================================
   100 my $logfile = "/tmp/foomatic-rip";
  ..
  3454 # In debug mode save the data supposed to be fed into the
  3455 # renderer also into a file
  3456 if ($debug) {
  3457   $commandline = "tee -a ${logfile}.ps | ( $commandline )";
  3458 }

Note: The $logfile variable declaration (line #100) is not an insecure
      temporary file use issue itself, since this danger (and its proper
      usage) is documented in /etc/foomatic/filters.conf file.

Relevant source code part (C script part / renderer.c):
========================================================
   436  /* Save the data supposed to be fed into the renderer
           also int        o a file*/
   437  dstrprepend(commandline, "tee -a " LOG_FILE ".ps | ( ");
   438  dstrcat(commandline, ")");
   439  }

Note: The LOG_FILE variable declaration by itself is not an insecure
      temporary file use, since this danger (and its proper usage)
      is documented in /etc/foomatic/filters.conf file.
Comment 1 Jan Lieskovsky 2011-07-28 10:53:14 EDT
This issue affects the versions of the foomatic package, as shipped with
Red Hat Enterprise Linux 4, 5, and 6.

--

This issue affects the versions of the foomatic package, as shipped with Fedora release of 14 and 15. Please schedule an update.
Comment 2 Jan Lieskovsky 2011-07-28 11:03:42 EDT
CVE Request:
[1] http://www.openwall.com/lists/oss-security/2011/07/28/9
Comment 3 Jan Lieskovsky 2011-07-28 11:04:36 EDT
Created foomatic tracking bugs for this issue

Affects: fedora-all [bug 726432]
Comment 5 Huzaifa S. Sidhpurwala 2011-08-18 04:32:28 EDT
Two CVEs have been assigned to this issue:

CVE-2011-2923 for the perl variant.

CVE-2011-2924 for the C variant.

Reference:
http://thread.gmane.org/gmane.comp.security.oss.general/5615/focus=5725
Comment 6 Tim Waugh 2011-08-18 11:30:19 EDT
There's this in foomaticrip.c as well:

    if (debug)
        logh = fopen(LOG_FILE ".log", "w"); /* insecure, use for debugging only */
Comment 7 Tim Waugh 2011-08-18 11:48:09 EDT
Reported upstream:
  http://bugs.linux-foundation.org/show_bug.cgi?id=936
Comment 8 Vincent Danen 2015-08-22 11:18:55 EDT
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

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