Skip to content

Out of bound read in HashPeImageByType

Moderate
jkmathews published GHSA-4wjw-6xmf-44xf Apr 7, 2025

Package

SecurityPkg (EDK2)

Affected versions

<=202502

Patched versions

None

Description

Summary
HashPeImageByType() could read out of bound.

This vulnerability was originally reported at https://bugzilla.tianocore.org/show_bug.cgi?id=2214.

Details
HashPeImageByType() is handed an auth blob data pointer and length. This blob comes from a PE file that is not trusted. The code proceeds to read the 2nd byte from the blob, without guaranteeing there are enough bytes to read from. This could read out of bound.

Impact
A successful exploit of this vulnerability may lead to a loss of Confidentiality, Integrity, and/or Availability.

Mitigation release plan
The patch files from bugzilla https://bugzilla.tianocore.org/show_bug.cgi?id=2214 are attached to this GHSA.
The patch is being upstreamed into EDK2. Public PR: #10928
Expect this to be included in the May 2025 stable tag release.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Adjacent
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

CVE ID

CVE-2024-38797

Weaknesses

Out-of-bounds Read

The product reads data past the end, or before the beginning, of the intended buffer. Learn more on MITRE.