GHSA-cqpr-pcm7-m3jc: Chrono Potential Segfault Vulnerability
MODERATEGHSA-cqpr-pcm7-m3jc is a MODERATE potential segfault vulnerability (General Security Weakness) affecting Chrono libraries in the crates.io ecosystem. The issue involves potential segfault in `localtime_r` invocations. Remediation is available by upgrading affected packages to version 0.4.20.
GHSA-cqpr-pcm7-m3jc at a Glance
How to Fix GHSA-cqpr-pcm7-m3jc
To remediate this vulnerability, upgrade all affected Chrono dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade chrono to 0.4.20
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for chrono
How to Check if You Are Affected
To determine whether your application is affected by GHSA-cqpr-pcm7-m3jc, inspect your project dependencies for Chrono:
inspect dependencies for chrono
Analyze the terminal output to locate any version of Chrono in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.20), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Chrono, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-cqpr-pcm7-m3jc Affected Chrono Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
chrono
|
crates.io |
< 0.4.20
|
0.4.20
|
References
Frequently Asked Questions
What is GHSA-cqpr-pcm7-m3jc?
Which Chrono versions are affected?
What version fixes GHSA-cqpr-pcm7-m3jc?
Is chrono affected?
What CWE is associated with GHSA-cqpr-pcm7-m3jc?
How can I check crates.io dependencies for GHSA-cqpr-pcm7-m3jc?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cqpr-pcm7-m3jc",
"modified" : "2022-08-04T19:38:53Z",
"published" : "2022-06-16T23:48:34Z",
"withdrawn" : "2022-07-21T18:06:06Z",
"aliases" : [ ],
"summary" : "Potential segfault in `localtime_r` invocations",
"details" : "### Impact\n\nUnix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.\n\n### Workarounds \n\nNo workarounds are known.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "chrono"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.4.20"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/chronotope/chrono/issues/499"
}, {
"type" : "WEB",
"url" : "https://github.com/time-rs/time/issues/293"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/chronotope/chrono"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2020-0159.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-16T23:48:34Z",
"nvd_published_at" : null
}
}