GHSA-2H5H-59F5-C5X9
Vulnerability from github – Published: 2023-05-03 21:56 – Updated: 2023-05-09 16:40Summary
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.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/sigstore/rekor"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.1.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-30551"
],
"database_specific": {
"cwe_ids": [
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2023-05-03T21:56:23Z",
"nvd_published_at": "2023-05-08T16:15:09Z",
"severity": "HIGH"
},
"details": "## Summary\nTwo 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.\n\nThese vulnerabilities were found through fuzzing with [OSS-Fuzz](https://google.github.io/oss-fuzz/).\n\n## Vulnerability 1: OOM due to large files in META-INF directory of JAR files.\n### Summary\nVerification 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.\n\n### Details\nAs part of verifying a JAR file, Rekor uses the [relic library](http://github.com/sassoftware/relic) 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.\n\n### Patches\nUsers should update to the latest version of Rekor, 1.1.1.\n\n### Workaround\nThere are no workarounds, users should update.\n\n## Vulnerability 2: OOM due to large .SIGN and .PKGINFO files in APK files.\n### Summary\nParsing 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.\n\n### Details\nWhen 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.\n\n### Patches\nUsers should update to the latest version of Rekor, 1.1.1.\n\n### Workaround\nThere are no workarounds, users should update.",
"id": "GHSA-2h5h-59f5-c5x9",
"modified": "2023-05-09T16:40:11Z",
"published": "2023-05-03T21:56:23Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/sigstore/rekor/security/advisories/GHSA-2h5h-59f5-c5x9"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-30551"
},
{
"type": "WEB",
"url": "https://github.com/sigstore/rekor/commit/cf42ace82667025fe128f7a50cf6b4cdff51cc48"
},
{
"type": "PACKAGE",
"url": "https://github.com/sigstore/rekor"
},
{
"type": "WEB",
"url": "https://github.com/sigstore/rekor/releases/tag/v1.1.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "Rekor\u0027s compressed archives can result in OOM conditions"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.