GHSA-FQ33-VMHV-48XH

Vulnerability from github – Published: 2023-04-07 19:23 – Updated: 2023-04-07 19:23
VLAI?
Summary
ntru-rs has unsound FFI: Wrong API usage causes write past allocated area
Details

The following usage causes undefined behavior.

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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "crates.io",
        "name": "ntru"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.4.3"
            },
            {
              "last_affected": "0.5.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": true,
    "github_reviewed_at": "2023-04-07T19:23:49Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "The following usage causes undefined behavior.\n```rust\nlet kp: ntru::types::KeyPair = \u2026;\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",
  "id": "GHSA-fq33-vmhv-48xh",
  "modified": "2023-04-07T19:23:49Z",
  "published": "2023-04-07T19:23:49Z",
  "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"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "ntru-rs has unsound FFI: Wrong API usage causes write past allocated area"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…