GHSA-rp9h-rf7g-hwgr: S2n tls S2n-tls Has Undefined Behavior At Vulnerability

LOW
Published
Advisory Summary

GHSA-rp9h-rf7g-hwgr is a LOW s2n-tls has undefined behavior at vulnerability (General Security Weakness) affecting S2n tls libraries in the crates.io ecosystem. The issue involves s2n-tls has undefined behavior at process exit. Remediation is available by upgrading affected packages to version 0.3.7.

GHSA-rp9h-rf7g-hwgr at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-rp9h-rf7g-hwgr
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product S2n tls
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-rp9h-rf7g-hwgr

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

s2n-tls fixed: 0.3.7
Upgrade s2n-tls to 0.3.7
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 s2n-tls

How to Check if You Are Affected

To determine whether your application is affected by GHSA-rp9h-rf7g-hwgr, inspect your project dependencies for S2n tls:

inspect dependencies for s2n-tls

Analyze the terminal output to locate any version of S2n tls in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.7), 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 S2n tls, 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

### Impact s2n-tls uses the Linux atexit function to register functions that clean up the global state when the process exits. In multi-threaded environments, the atexit handler may clean up state which is still in use by other threads. When this occurs, the exiting process may experience a segmentation fault or other undefined behavior. Customers of AWS services do not need to take action. Applications using s2n-tls should upgrade to the most recent release of s2n-tls. **Impacted versions**: < v1.5.9. ### Patches The patch commit [493b771](https://github.com/aws/s2n-tls/commit/493b77167dc367c394de23cfe78a029298e2a254) is included in s2n-tls v1.5.9 [1] ### Workarounds The atexit handler may be disabled by calling `s2n_disable_atexit()` prior to initializing s2n-tls. The atexit handler is off by default in the patched versions. For further details, refer to [s2n-tls Usage Guide: Initialization and Teardown](https://github.com/aws/s2n-tls/blob/main/docs/usage-guide/topics/ch02-initialization.md). If you have any questions or comments about this advisory, we ask that you contact AWS/Amazon Security via our vulnerability reporting page [2] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue. [1] https://github.com/aws/s2n-tls/releases/tag/v1.5.9 [2] Vulnerability reporting page: https://aws.amazon.com/security/vulnerability-reporting

GHSA-rp9h-rf7g-hwgr Affected S2n tls Versions

1 component(s)
Fixed Versions:
0.3.7
Product / Package Ecosystem Affected Versions Fixed Version
s2n-tls
crates.io
< 0.3.7
0.3.7

References

Frequently Asked Questions

What is GHSA-rp9h-rf7g-hwgr?
GHSA-rp9h-rf7g-hwgr is a security vulnerability in S2n tls involving s2n-tls has undefined behavior at process exit under General Security Weakness.
Which S2n tls versions are affected?
Affected versions include releases prior to 0.3.7 across affected packages: s2n-tls.
What version fixes GHSA-rp9h-rf7g-hwgr?
Upgrading to 0.3.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is s2n-tls affected?
Yes, s2n-tls is affected in releases prior to 0.3.7. Upgrade your dependency to 0.3.7 or later.
What CWE is associated with GHSA-rp9h-rf7g-hwgr?
GHSA-rp9h-rf7g-hwgr is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-rp9h-rf7g-hwgr?
Run the dependency tree command: 'inspect dependencies for s2n-tls'. 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-rp9h-rf7g-hwgr",
  "modified" : "2024-11-14T15:45:55Z",
  "published" : "2024-11-14T15:45:55Z",
  "aliases" : [ ],
  "summary" : "s2n-tls has undefined behavior at process exit",
  "details" : "### Impact\ns2n-tls uses the Linux atexit function to register functions that clean up the global state when the process exits. In multi-threaded environments, the atexit handler may clean up state which is still in use by other threads. When this occurs, the exiting process may experience a segmentation fault or other undefined behavior. \n\nCustomers of AWS services do not need to take action. Applications using s2n-tls should upgrade to the most recent release of s2n-tls.\n\n**Impacted versions**: < v1.5.9.\n\n### Patches\nThe patch commit [493b771](https://github.com/aws/s2n-tls/commit/493b77167dc367c394de23cfe78a029298e2a254) is included in s2n-tls v1.5.9 [1]\n\n### Workarounds\nThe atexit handler may be disabled by calling `s2n_disable_atexit()` prior to initializing s2n-tls. The atexit handler is off by default in the patched versions. For further details, refer to [s2n-tls Usage Guide: Initialization and Teardown](https://github.com/aws/s2n-tls/blob/main/docs/usage-guide/topics/ch02-initialization.md).\n\nIf you have any questions or comments about this advisory, we ask that you contact AWS/Amazon Security via our vulnerability reporting page [2] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.\n\n[1] https://github.com/aws/s2n-tls/releases/tag/v1.5.9\n[2] Vulnerability reporting page: https://aws.amazon.com/security/vulnerability-reporting\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "s2n-tls"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/aws/s2n-tls/security/advisories/GHSA-rp9h-rf7g-hwgr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/s2n-tls/commit/493b77167dc367c394de23cfe78a029298e2a254"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/aws/s2n-tls"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/s2n-tls/releases/tag/v1.5.9"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-14T15:45:55Z",
    "nvd_published_at" : null
  }
}