GHSA-fq33-vmhv-48xh: ntru-rs has unsound FFI Wrong API Usage Causes Write Vulnerability
MODERATEGHSA-fq33-vmhv-48xh is a MODERATE wrong api usage causes write vulnerability (General Security Weakness) affecting ntru-rs has unsound FFI libraries in the crates.io ecosystem. The issue involves wrong api usage causes write past allocated area. Remediation is available in the latest vendor maintenance releases.
GHSA-fq33-vmhv-48xh at a Glance
How to Fix GHSA-fq33-vmhv-48xh
To remediate this vulnerability, upgrade all affected ntru-rs has unsound FFI 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 ntru to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for ntru
How to Check if You Are Affected
To determine whether your application is affected by GHSA-fq33-vmhv-48xh, inspect your project dependencies for ntru-rs has unsound FFI:
inspect dependencies for ntru
Analyze the terminal output to locate any version of ntru-rs has unsound FFI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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 ntru-rs has unsound FFI, 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-fq33-vmhv-48xh Affected ntru-rs has unsound FFI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ntru
|
crates.io |
≥ 0.4.3
≤ 0.5.6
|
|
References
Frequently Asked Questions
What is GHSA-fq33-vmhv-48xh?
Which ntru-rs has unsound FFI versions are affected?
What version fixes GHSA-fq33-vmhv-48xh?
Is ntru affected?
What CWE is associated with GHSA-fq33-vmhv-48xh?
How can I check crates.io dependencies for GHSA-fq33-vmhv-48xh?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fq33-vmhv-48xh",
"modified" : "2023-04-07T19:23:49Z",
"published" : "2023-04-07T19:23:49Z",
"aliases" : [ ],
"summary" : "ntru-rs has unsound FFI: Wrong API usage causes write past allocated area",
"details" : "The following usage causes undefined behavior.\n```rust\nlet kp: ntru::types::KeyPair = …;\nkp.get_public().export(Default::default())\n```\n\nWhen compiled with debug assertions, the code above will trigger a `attempt to subtract with overflow` panic before UB occurs.\nOther mistakes (e.g. using `EncParams` from a different key) may always trigger UB.\n\nLikely, older versions of this crate are also affected, but have not been tested.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "ntru"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.4.3"
}, {
"last_affected" : "0.5.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FrinkGlobal/ntru-rs/issues/8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/FrinkGlobal/ntru-rs"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0032.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-04-07T19:23:49Z",
"nvd_published_at" : null
}
}