GHSA-3fg9-hcq5-vxrc: Iana time zone Iana-time-zone Vulnerable To Use After Vulnerability

MODERATE
CWE-416
Published
Advisory Summary

GHSA-3fg9-hcq5-vxrc is a MODERATE iana-time-zone vulnerable to use after vulnerability (CWE-416: Use After Free) affecting Iana time zone libraries in the crates.io ecosystem. The issue involves iana-time-zone vulnerable to use after free in macos / ios implementation. Remediation is available by upgrading affected packages to version 0.1.45.

GHSA-3fg9-hcq5-vxrc at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-3fg9-hcq5-vxrc
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-416: Use After Free
Affected Product Iana time zone
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-3fg9-hcq5-vxrc

To remediate this vulnerability, upgrade all affected Iana time zone dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

iana-time-zone fixed: 0.1.45
Upgrade iana-time-zone to 0.1.45
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for iana-time-zone

How to Check if You Are Affected

To determine whether your application is affected by GHSA-3fg9-hcq5-vxrc, inspect your project dependencies for Iana time zone:

inspect dependencies for iana-time-zone

Analyze the terminal output to locate any version of Iana time zone in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.45), 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 CWE-416: Use After Free, where the product reuses or references memory after it has been freed. at some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. In Iana time zone, 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

In iana-time-zone v0.1.43 a use-after-free bug in the MacOS / iOS implementation was introduced. The copied system time zone was released before its name was copied. If the system time zone was changed between the call of `CFRelease` and `str::to_owned()`, random memory would be copied.

GHSA-3fg9-hcq5-vxrc Affected Iana time zone Versions

1 component(s)
Fixed Versions:
0.1.45
Product / Package Ecosystem Affected Versions Fixed Version
iana-time-zone
crates.io
≥ 0.1.43
< 0.1.45
0.1.45

References

Frequently Asked Questions

What is GHSA-3fg9-hcq5-vxrc?
GHSA-3fg9-hcq5-vxrc is a security vulnerability in Iana time zone involving iana-time-zone vulnerable to use after free in MacOS / iOS implementation under CWE-416: Use After Free.
Which Iana time zone versions are affected?
Affected versions include releases prior to 0.1.45 across affected packages: iana-time-zone.
What version fixes GHSA-3fg9-hcq5-vxrc?
Upgrading to 0.1.45 (or the latest patched release for your respective branch) resolves the vulnerability.
Is iana-time-zone affected?
Yes, iana-time-zone is affected in releases prior to 0.1.45. Upgrade your dependency to 0.1.45 or later.
What CWE is associated with GHSA-3fg9-hcq5-vxrc?
GHSA-3fg9-hcq5-vxrc is classified under CWE-416: Use After Free (The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.).
How can I check crates.io dependencies for GHSA-3fg9-hcq5-vxrc?
Run the dependency tree command: 'inspect dependencies for iana-time-zone'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3fg9-hcq5-vxrc",
  "modified" : "2022-08-30T19:55:41Z",
  "published" : "2022-08-30T19:55:41Z",
  "aliases" : [ ],
  "summary" : "iana-time-zone vulnerable to use after free in MacOS / iOS implementation",
  "details" : "In iana-time-zone v0.1.43 a use-after-free bug in the MacOS / iOS implementation was introduced.\n\nThe copied system time zone was released before its name was copied.\nIf the system time zone was changed between the call of `CFRelease` and `str::to_owned()`,\nrandom memory would be copied.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "iana-time-zone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.1.43"
      }, {
        "fixed" : "0.1.45"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/strawlab/iana-time-zone/pull/54"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/strawlab/iana-time-zone"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2022-0049.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-416" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-08-30T19:55:41Z",
    "nvd_published_at" : null
  }
}