logo

GHSA-fq33-vmhv-48xh ntru

Package

Manager: cargo
Name: ntru
Vulnerable Version: >=0.4.3 <=0.5.6

Severity

Level: Medium

CVSS v3.1: CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C

CVSS v4.0: CVSS:4.0/AV:A/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

EPSS: N/A pctlN/A

Details

ntru-rs has unsound FFI: Wrong API usage causes write past allocated area The following usage causes undefined behavior. ```rust let kp: ntru::types::KeyPair = …; kp.get_public().export(Default::default()) ``` When compiled with debug assertions, the code above will trigger a `attempt to subtract with overflow` panic before UB occurs. Other mistakes (e.g. using `EncParams` from a different key) may always trigger UB. Likely, older versions of this crate are also affected, but have not been tested.

Metadata

Created: 2023-04-07T19:23:49Z
Modified: 2023-04-07T19:23:49Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/04/GHSA-fq33-vmhv-48xh/GHSA-fq33-vmhv-48xh.json
CWE IDs: []
Alternative ID: N/A
Finding: F316
Auto approve: 1