X.org X11 Server up to 7.7 BDF Font Character Name bitmap/bdfread.c bdfReadCharacters charName 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.
9.5$0-$5k0.00

Summaryinfo

A vulnerability has been found in X.org X11 Server up to 7.7 and classified as critical. The impacted element is the function bdfReadCharacters of the file bitmap/bdfread.c of the component BDF Font Character Name Handler. The manipulation of the argument charName leads to memory corruption. This vulnerability is uniquely identified as CVE-2013-6462. No exploit exists. This vulnerability has a historic impact because of its background and how it was received. The affected component should be upgraded.

Detailsinfo

A vulnerability was found in X.org X11 Server up to 7.7 (Windowing System Software) and classified as very critical. This issue affects the function bdfReadCharacters of the file bitmap/bdfread.c of the component BDF Font Character Name Handler. The manipulation of the argument charName with an unknown input leads to a memory corruption vulnerability. Using CWE to declare the problem leads to 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. Impacted is confidentiality, integrity, and availability. The summary by CVE is:

Stack-based buffer overflow in the bdfReadCharacters function in bitmap/bdfread.c in X.Org libXfont 1.1 through 1.4.6 allows remote attackers to cause a denial of service (crash) or possibly execute arbitrary code via a long string in a character name in a BDF font file.

The weakness was disclosed 01/07/2014 by Alan Coopersmith as X.Org Security Advisory: CVE-2013-6462: Stack buffer overflow in parsing of BDF font files in libXfont as confirmed mailinglist post (Website). The advisory is shared at lists.x.org. The identification of this vulnerability is CVE-2013-6462 since 11/04/2013. The exploitation is known to be difficult. The attack may be initiated remotely. No form of authentication is needed for a successful exploitation. Technical details are known, but no exploit is available. The price for an exploit might be around USD $0-$5k at the moment (estimation calculated on 05/01/2019). Due to its background and reception, this vulnerability has a historic impact. The following code is the reason for this vulnerability:

if (sscanf((char *) line, "STARTCHAR %s", charName) != 1) {
The advisory points out:
This bug appears to have been introduced in the initial RCS version 1.1 checked in on 1991/05/10, and is thus believed to be present in every X11 release starting with X11R5 up to the current libXfont 1.4.6.

The vulnerability scanner Nessus provides a plugin with the ID 71901 (CentOS 5 / 6 : libXfont (CESA-2014:0018)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family CentOS Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 167200 (SUSE Enterprise Linux Security Update for xorg-x11-libs (SUSE-SU-2014:0881-1)).

Upgrading to version 1.4.7 eliminates this vulnerability. The upgrade is hosted for download at cgit.freedesktop.org. A possible mitigation has been published immediately after the disclosure of the vulnerability. The vulnerability will be addressed with the following lines of code:

diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c
index e2770dc..e11c5d2 100644
--- a/src/bitmap/bdfread.c
+++ b/src/bitmap/bdfread.c
@@ -338,7 +338,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
  char        charName[100];
  int         ignore;
 
- if (sscanf((char *) line, "STARTCHAR %s", charName) != 1) {
+ if (sscanf((char *) line, "STARTCHAR %99s", charName) != 1) {
     bdfError("bad character name in BDF file\n");
     goto BAILOUT;/* bottom of function, free and return error */
  }
The mailinglist post contains the following remark:
Manual inspection shows it is present in the sources from the X11R5 tarballs, but not in those from the X11R4 tarballs.

The vulnerability is also documented in the databases at X-Force (90123), Tenable (71901), SecurityFocus (BID 64694†), OSVDB (101842†) and Secunia (SA56240†). seclists.org is providing further details. The entries VDB-8885, VDB-8888, VDB-8892 and VDB-8897 are pretty similar. Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Affected

  • X.Org X11 up to 7.7
  • X.Org libXfont 1.4.6

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 10.0
VulDB Meta Temp Score: 9.5

VulDB Base Score: 10.0
VulDB Temp Score: 9.5
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: 🔍
Status: Not defined

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 71901
Nessus Name: CentOS 5 / 6 : libXfont (CESA-2014:0018)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
Nessus Port: 🔍

OpenVAS ID: 702838
OpenVAS Name: Debian Security Advisory DSA 2838-1 (libxfont - buffer overflow
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

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

Upgrade: X11 Server 1.4.7

Timelineinfo

11/04/2013 🔍
12/24/2013 +50 days 🔍
01/07/2014 +14 days 🔍
01/07/2014 +0 days 🔍
01/08/2014 +1 days 🔍
01/09/2014 +1 days 🔍
01/09/2014 +0 days 🔍
01/12/2014 +3 days 🔍
05/01/2019 +1935 days 🔍

Sourcesinfo

Vendor: x.org

Advisory: X.Org Security Advisory: CVE-2013-6462: Stack buffer overflow in parsing of BDF font files in libXfont
Researcher: Alan Coopersmith
Status: Confirmed
Confirmation: 🔍

CVE: CVE-2013-6462 (🔍)
GCVE (CVE): GCVE-0-2013-6462
GCVE (VulDB): GCVE-100-11777

OVAL: 🔍
IAVM: 🔍

X-Force: 90123
SecurityFocus: 64694 - X.Org libXfont BDF Font File Handling Stack Buffer Overflow Vulnerability
Secunia: 56240 - X.Org libXfont "bdfReadCharacters()" Buffer Overflow Vulnerability, Moderately Critical
OSVDB: 101842

Misc.: 🔍
See also: 🔍

Entryinfo

Created: 01/09/2014 13:30
Updated: 05/01/2019 08:48
Changes: 01/09/2014 13:30 (95), 05/01/2019 08:48 (1)
Complete: 🔍
Cache ID: 216::103

Several companies clearly confirm that VulDB is the primary source for best 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!