GHSA-45W3-V3G4-54PM
Vulnerability from github – Published: 2022-02-11 19:11 – Updated: 2022-09-12 20:44Impact
Several vulnerabilities have been reported in the time and chrono crates related to handling of calls to localtime_r. You can follow some of the discussions here and here, and the associated CVE here. In our case, the issue with the dependency was flagged by our nightly CI build running cargo-audit.
The vulnerability leads to a segfault in specific circumstances - namely, when one of a number of functions in the time crate is called while any other thread is setting an environment variable. Given that in the case of the Parsec service this affects the SPIFFE authenticator, Parsec service users can encounter the issue only when the JWT SVID authenticator is enabled and being used. We have not undergone any manual tracing to understand if the vulnerable methods are called anywhere in our stack, however it seems reasonable to expect that if that were to be the case, the issue would lie in JWT validation (i.e. when handling the dates found within a Json Web Token). JWT validation could thus fail, bringing down the thread in which the request happens. The rest of the threads continue to work. Since the threadpool implementation that we use continues replenishing the pool when one thread panics, the impact on the service should be minimal.
Patches
No current patches exist as the problems lie in a number of dependencies that are not under our control (see more details here).
The issue tracking the required change in the rust-spiffe crate (through which the vulnerable dependencies are imported in Parsec) can be seen here. Once updates happen in our dependency chain that allow us to update beyond the vulnerable versions of time and chrono, a new version of the Parsec service will be tagged and released with the appropriate notifications.
Workarounds
The only complete workaround is to use a different type of authenticator with the Parsec service.
References
As quoted in the initial paragraph, you can find out more information:
* in the chrono repo issue here
* in the time repo issue here
* in the official CVE report here
* in our tracking issue here
For more information:
If you have any questions or comments about this advisory: * Open an issue in the Parsec service repo * Email us at cncf-parsec-maintainers@lists.cncf.io
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "parsec-service"
},
"ranges": [
{
"events": [
{
"introduced": "0.8.0"
},
{
"fixed": "1.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": true,
"github_reviewed_at": "2022-02-11T19:11:36Z",
"nvd_published_at": null,
"severity": "LOW"
},
"details": "### Impact\nSeveral vulnerabilities have been reported in the `time` and `chrono` crates related to handling of calls to `localtime_r`. You can follow some of the discussions [here](https://github.com/chronotope/chrono/issues/602) and [here](https://github.com/time-rs/time/issues/293), and the associated CVE [here](https://nvd.nist.gov/vuln/detail/CVE-2020-26235). In our case, the issue with the dependency was flagged by our nightly CI build running [`cargo-audit`](https://github.com/parallaxsecond/parsec/issues/544). \n\nThe vulnerability leads to a segfault in specific circumstances - namely, when one of a number of functions in the `time` crate is called while any other thread is setting an environment variable. Given that in the case of the Parsec service this affects the SPIFFE authenticator, Parsec service users can encounter the issue only when the JWT SVID authenticator is enabled and being used. We have not undergone any manual tracing to understand if the vulnerable methods are called anywhere in our stack, however it seems reasonable to expect that if that were to be the case, the issue would lie in JWT validation (i.e. when handling the dates found within a Json Web Token). JWT validation could thus fail, bringing down the thread in which the request happens. The rest of the threads continue to work. Since the threadpool implementation that we use [continues replenishing the pool](https://docs.rs/threadpool/latest/threadpool/) when one thread panics, the impact on the service should be minimal.\n\n### Patches\nNo current patches exist as the problems lie in a number of dependencies that are not under our control (see more details [here](https://github.com/parallaxsecond/parsec/issues/544#issuecomment-1024185688)).\n\nThe issue tracking the required change in the `rust-spiffe` crate (through which the vulnerable dependencies are imported in Parsec) can be seen [here](https://github.com/maxlambrecht/rust-spiffe/issues/17). Once updates happen in our dependency chain that allow us to update beyond the vulnerable versions of `time` and `chrono`, a new version of the Parsec service will be tagged and released with the appropriate notifications.\n\n### Workarounds\nThe only complete workaround is to use a different type of authenticator with the Parsec service. \n\n### References\nAs quoted in the initial paragraph, you can find out more information:\n* in the `chrono` repo issue [here](https://github.com/chronotope/chrono/issues/602)\n* in the `time` repo issue [here](https://github.com/time-rs/time/issues/293)\n* in the official CVE report [here](https://nvd.nist.gov/vuln/detail/CVE-2020-26235)\n* in our tracking issue [here](https://github.com/parallaxsecond/parsec/issues/544)\n\n### For more information:\nIf you have any questions or comments about this advisory:\n* Open an issue in [the Parsec service repo](https://github.com/parallaxsecond/parsec)\n* Email us at [cncf-parsec-maintainers@lists.cncf.io](mailto:cncf-parsec-maintainers@lists.cncf.io)",
"id": "GHSA-45w3-v3g4-54pm",
"modified": "2022-09-12T20:44:49Z",
"published": "2022-02-11T19:11:36Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/parallaxsecond/parsec/security/advisories/GHSA-45w3-v3g4-54pm"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-26235"
},
{
"type": "WEB",
"url": "https://github.com/chronotope/chrono/issues/602"
},
{
"type": "WEB",
"url": "https://github.com/parallaxsecond/parsec/issues/544"
},
{
"type": "WEB",
"url": "https://github.com/parallaxsecond/parsec/issues/544#issuecomment-1024185688"
},
{
"type": "WEB",
"url": "https://github.com/time-rs/time/issues/293"
},
{
"type": "PACKAGE",
"url": "https://github.com/parallaxsecond/parsec"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Chrono has potential segfault issue in SPIFFE authenticator"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
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.