CVE-2024-29507

Description

A flaw was found in Ghostscript. Under specific conditions, the cidfsubstpath and cidfsubstfont parameters set by corresponding Postscript objects are used to load substitute fonts in pdfi_open_CIDFont_substitute_file. The values are copied via memcpy into the fontfname buffer without bounds checks. This flaw allows an attacker to pass values larger than the buffer size to trigger a stack buffer overflow, leading to a denial of service or other unexpected behavior.

Statement

The buffer overflow vulnerability in Ghostscript, while serious, is categorized as moderate severity due to its limited impact vector and exploitation complexity. The flaw involves unchecked copying of data into a buffer via memcpy when handling the cidfsubstpath and cidfsubstfont parameters. Although this can lead to a stack buffer overflow, resulting in potential denial of service or unexpected behavior, the exploitability is constrained by specific conditions under which the parameters must be set. Furthermore, successful exploitation requires the attacker to have control over the input parameters and the environment in which Ghostscript operates.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.4N/AN/A
Attack VectorNetworkN/AN/A
Attack ComplexityLowN/AN/A
Privileges RequiredNoneN/AN/A
User InteractionRequiredN/AN/A
ScopeUnchangedN/AN/A
ConfidentialityNoneN/AN/A
Integrity ImpactLowN/AN/A
Availability ImpactLowN/AN/A

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L

Understanding the Weakness (CWE)

Availability

Technical Impact: Modify Memory; DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory)

Buffer overflows generally lead to crashes. Other attacks leading to lack of availability are possible, including putting the program into an infinite loop.

Integrity,Confidentiality,Availability,Access Control

Technical Impact: Modify Memory; Execute Unauthorized Code or Commands; Bypass Protection Mechanism

Buffer overflows often can be used to execute arbitrary code, which is usually outside the scope of a program's implicit security policy.

Integrity,Confidentiality,Availability,Access Control,Other

Technical Impact: Modify Memory; Execute Unauthorized Code or Commands; Bypass Protection Mechanism; Other

When the consequence is arbitrary code execution, this can often be used to subvert any other security service.

Frequently Asked Questions

Want to get errata notifications? Sign up here.