Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS0yaDVoLTU5ZjUtYzV4Oc4AAzEu

Rekor's compressed archives can result in OOM conditions

Summary

Two vulnerabilities have been found in Rekor types for archive files JARs and APKs, where Rekor would crash due to out of memory conditions caused by reading archive metadata files into memory without checking their sizes first causing a Denial of Service of Rekor.

These vulnerabilities were found through fuzzing with OSS-Fuzz.

Vulnerability 1: OOM due to large files in META-INF directory of JAR files.

Summary

Verification of a JAR file submitted to Rekor can cause an out of memory crash if files within the META-INF directory of the JAR are sufficiently large.

Details

As part of verifying a JAR file, Rekor uses the relic library to check that the JAR is signed, the signature verifies, and that the hashes in the signed manifest are all valid. This library function reads files within META-INF/ into memory without checking their sizes, resulting in an OOM if the uncompressed file is sufficiently large. Rekor is also not performing any such checks prior to passing the JAR to this library function.

Patches

Users should update to the latest version of Rekor, 1.1.1.

Workaround

There are no workarounds, users should update.

Vulnerability 2: OOM due to large .SIGN and .PKGINFO files in APK files.

Summary

Parsing of an APK file submitted to Rekor can cause an out of memory crash if the .SIGN or .PKGINFO files within the APK are sufficiently large.

Details

When parsing an APK file, Rekor allocates byte slices to read both the .SIGN and .PKGINFO files into memory in order to verify the signature and hashes in the APK. These byte slices are allocated based on the size included in the tar header for each file, with no checks performed on that size. If the size in the header is sufficiently large, either because the uncompressed file is large or the size in the header has been artificially set to a large value, Rekor will crash due to an out of memory panic.

Patches

Users should update to the latest version of Rekor, 1.1.1.

Workaround

There are no workarounds, users should update.

Permalink: https://github.com/advisories/GHSA-2h5h-59f5-c5x9
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0yaDVoLTU5ZjUtYzV4Oc4AAzEu
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 1 year ago
Updated: about 1 year ago


CVSS Score: 7.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS Percentage: 0.00187
EPSS Percentile: 0.5617

Identifiers: GHSA-2h5h-59f5-c5x9, CVE-2023-30551
References: Repository: https://github.com/sigstore/rekor
Blast Radius: 21.7

Affected Packages

go:github.com/sigstore/rekor
Dependent packages: 496
Dependent repositories: 789
Downloads:
Affected Version Ranges: < 1.1.1
Fixed in: 1.1.1
All affected versions: 0.1.0, 0.1.1, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.12.0, 0.12.1, 0.12.2, 1.0.0, 1.0.1, 1.1.0
All unaffected versions: 1.1.1, 1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7