Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add advisory for stack buffer overflow with whoami #1911

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions crates/whoami/RUSTSEC-0000-0000.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
```toml
[advisory]
id = "RUSTSEC-0000-0000"
package = "whoami"
date = "2024-02-28"
url = "https://github.com/ardaku/whoami/issues/91"
categories = ["denial-of-service", "memory-corruption"]
keywords = ["buffer-overflow", "stack-buffer-overflow", "cwe-121"]

[affected]
# Other Unix OSes that aren't any of these may be affected as well:
# linux, macos, freebsd, dragonfly, bitrig, openbsd, netbsd
os = ["illumos", "solaris"]
functions = { "whoami::username" = ["< 1.5.0"] }

[versions]
patched = [">= 1.5.0"]
```

# Stack buffer overflow with whoami on illumos and Solaris

With older versions of the whoami crate, calling the `username` function leads to an immediate stack
buffer overflow on illumos and Solaris. Denial of service and data corruption have both been
observed in the wild, and the issue is possibly exploitable as well.

This also affects any other Unix platforms that aren't any of: `linux`, `macos`, `freebsd`,
`dragonfly`, `bitrig`, `openbsd`, `netbsd`.

This issue has been addressed in whoami 1.5.0.

For more information, see [this GitHub issue](https://github.com/ardaku/whoami/issues/91).