GitHub Advisoryadvisory · crates.io
GHSA-w5w5-8vfh-xcjq whoami stack buffer overflow on several Unix platforms
HIGH
Official page ↗
- Ecosystem
- crates.io
- Packages
- whoami
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
- Weaknesses
- CWE-121
- Reviewed
- 2024-04-05
Affected packages
• crates.io whoami: >= 0.5.3, < 1.5.0 → fixed in 1.5.0
Description
With versions of the whoami crate >= 0.5.3 and = 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.
Related
Weakness · CWE (1)
- CWE-121 Stack-based Buffer Overflow weakness