rustsec-2024-0020
Vulnerability from osv_rustsec
Published
2024-02-28 12:00
Modified
2024-04-11 16:16
Summary
Stack buffer overflow with whoami on several Unix platforms
Details

With versions of the whoami crate >= 0.5.3 and < 1.5.0, calling any of these functions leads to an immediate stack buffer overflow on illumos and Solaris:

  • whoami::username
  • whoami::realname
  • whoami::username_os
  • whoami::realname_os

With versions of the whoami crate >= 0.5.3 and < 1.0.1, calling any of the above functions also leads to a stack buffer overflow on these platforms:

  • Bitrig
  • DragonFlyBSD
  • FreeBSD
  • NetBSD
  • OpenBSD

This occurs because of an incorrect definition of the passwd struct on those platforms.

As a result of this issue, denial of service and data corruption have both been observed in the wild. The issue is possibly exploitable as well.

This vulnerability also affects other Unix platforms that aren't Linux or macOS.

This issue has been addressed in whoami 1.5.0.

For more information, see this GitHub issue.


{
  "affected": [
    {
      "database_specific": {
        "categories": [
          "denial-of-service",
          "memory-corruption"
        ],
        "cvss": null,
        "informational": null
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [
            "whoami::realname",
            "whoami::realname_os",
            "whoami::username",
            "whoami::username_os"
          ],
          "os": [
            "illumos",
            "solaris",
            "dragonfly",
            "freebsd",
            "netbsd",
            "openbsd"
          ]
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "whoami",
        "purl": "pkg:cargo/whoami"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.5.3"
            },
            {
              "fixed": "1.5.0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [
    "GHSA-w5w5-8vfh-xcjq"
  ],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "With versions of the whoami crate \u003e= 0.5.3 and \u003c 1.5.0, calling any of these functions leads to an\nimmediate stack buffer overflow on illumos and Solaris:\n\n- `whoami::username`\n- `whoami::realname`\n- `whoami::username_os`\n- `whoami::realname_os`\n\nWith versions of the whoami crate \u003e= 0.5.3 and \u003c 1.0.1, calling any of the above functions also\nleads to a stack buffer overflow on these platforms:\n\n- Bitrig\n- DragonFlyBSD\n- FreeBSD\n- NetBSD\n- OpenBSD\n\nThis occurs because of an incorrect definition of the `passwd` struct on those platforms.\n\nAs a result of this issue, denial of service and data corruption have both been observed in the\nwild. The issue is possibly exploitable as well.\n\nThis vulnerability also affects other Unix platforms that aren\u0027t Linux or macOS.\n\nThis issue has been addressed in whoami 1.5.0.\n\nFor more information, see [this GitHub issue](https://github.com/ardaku/whoami/issues/91).",
  "id": "RUSTSEC-2024-0020",
  "modified": "2024-04-11T16:16:20Z",
  "published": "2024-02-28T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/whoami"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2024-0020.html"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/ardaku/whoami/issues/91"
    }
  ],
  "related": [],
  "severity": [],
  "summary": "Stack buffer overflow with whoami on several Unix platforms"
}


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…