CUPS 2.0.1 cupsRasterReadPixels memory corruption

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.6$0-$5k0.00

Summaryinfo

A vulnerability marked as critical has been reported in CUPS 2.0.1. This impacts the function cupsRasterReadPixels. This manipulation causes memory corruption. The identification of this vulnerability is CVE-2014-9679. Furthermore, there is an exploit available. It is recommended to apply a patch to fix this issue.

Detailsinfo

A vulnerability was found in CUPS 2.0.1 (Printing Software). It has been declared as critical. Affected by this vulnerability is the function cupsRasterReadPixels. The manipulation with an unknown input leads to a memory corruption vulnerability. The CWE definition for the vulnerability is CWE-119. The product performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:

Integer underflow in the cupsRasterReadPixels function in filter/raster.c in CUPS before 2.0.2 allows remote attackers to have unspecified impact via a malformed compressed raster file, which triggers a buffer overflow.

The weakness was shared 12/29/2014 by Peter De Wachter as STR #4551 as confirmed patch (Bug Tracker). It is possible to read the advisory at cups.org. This vulnerability is known as CVE-2014-9679 since 02/12/2015. The attack can be launched remotely. The exploitation doesn't need any form of authentication. Technical details and also a public exploit are known. Responsible for the vulnerability is the following code:

memcpy(temp, temp - r->bpp, r->bpp);
temp  += r->bpp;
count -= r->bpp;

A public exploit has been developed by Peter De Wachter in ANSI C and been published immediately after the advisory. It is possible to download the exploit at cups.org. It is declared as proof-of-concept. The vulnerability scanner Nessus provides a plugin with the ID 81573 (Ubuntu 10.04 LTS / 12.04 LTS / 14.04 LTS / 14.10 : cups vulnerability (USN-2520-1)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Ubuntu Local Security Checks. The commercial vulnerability scanner Qualys is able to test this issue with plugin 350143 (Amazon Linux Security Advisory for cups: ALAS-2015-559). The code used by the exploit is:

#include <stdlib.h>
#include <cups/raster.h>

int main()
{
  cups_raster_t *raster;
  cups_page_header2_t header;
  unsigned char *buf;
  unsigned line, r;

  raster = cupsRasterOpen(0, CUPS_RASTER_READ);
  if (!raster)
    return 1;

  r = cupsRasterReadHeader2(raster, &header);
  if (!r)
    return 1;

  buf = malloc(header.cupsBytesPerLine);
  if (!buf)
    return 1;

  for (line = 0; line < header.cupsHeight; line++) {
    r = cupsRasterReadPixels(raster, buf, header.cupsBytesPerLine);
    if (r != header.cupsBytesPerLine)
      break;
  }

  free(buf);
  cupsRasterClose(raster);
  return 0;
}

Upgrading to version 2.1 eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at cups.org. The best possible mitigation is suggested to be patching the affected component. A possible mitigation has been published immediately after the disclosure of the vulnerability. The vulnerability will be addressed with the following lines of code:

*temp = *(temp - r->bpp);
temp  += 1;
count -= 1;

The vulnerability is also documented in the databases at Tenable (81573), SecurityFocus (BID 72594†), SecurityTracker (ID 1031776†) and Vulnerability Center (SBV-48850†). The entry VDB-75844 is related to this item. Be aware that VulDB is the high quality source for vulnerability data.

Productinfo

Type

Name

Version

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.3
VulDB Meta Temp Score: 6.6

VulDB Base Score: 7.3
VulDB Temp Score: 6.6
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Memory corruption
CWE: CWE-119
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Peter De Wachter
Programming Language: 🔍
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 81573
Nessus Name: Ubuntu 10.04 LTS / 12.04 LTS / 14.04 LTS / 14.10 : cups vulnerability (USN-2520-1)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Port: 🔍

OpenVAS ID: 14611
OpenVAS Name: Amazon Linux Local Check: ALAS-2015-559
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Patch
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Exploit Delay Time: 🔍

Upgrade: CUPS 2.1
Patch: cups.org

Timelineinfo

12/29/2014 🔍
12/29/2014 +0 days 🔍
12/29/2014 +0 days 🔍
02/10/2015 +43 days 🔍
02/10/2015 +0 days 🔍
02/12/2015 +2 days 🔍
02/19/2015 +7 days 🔍
02/20/2015 +1 days 🔍
02/23/2015 +3 days 🔍
02/27/2015 +4 days 🔍
03/02/2015 +3 days 🔍
03/10/2022 +2565 days 🔍

Sourcesinfo

Advisory: STR #4551
Researcher: Peter De Wachter
Status: Confirmed
Confirmation: 🔍

CVE: CVE-2014-9679 (🔍)
GCVE (CVE): GCVE-0-2014-9679
GCVE (VulDB): GCVE-100-69199

OVAL: 🔍

SecurityFocus: 72594 - CUPS cupsRasterReadPixels Buffer Overflow Vulnerability
SecurityTracker: 1031776 - CUPS cupsRasterReadPixels() Buffer Overflow Has Unspecified Impact
Vulnerability Center: 48850 - CUPS before 2.0.2 Remote Unspecified Vulnerability via a Malformed Compressed Raster File, Medium

scip Labs: https://www.scip.ch/en/?labs.20161013
See also: 🔍

Entryinfo

Created: 02/23/2015 09:10
Updated: 03/10/2022 15:00
Changes: 02/23/2015 09:10 (84), 06/21/2017 11:03 (9), 03/10/2022 15:00 (3)
Complete: 🔍
Cache ID: 216::103

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you need the next level of professionalism?

Upgrade your account now!