Description
An issue was discovered in the nix crate 0.16.0 and later before 0.20.2, 0.21.x before 0.21.2, and 0.22.x before 0.22.2 for Rust. unistd::getgrouplist has an out-of-bounds write if a user is in more than 16 /etc/groups groups.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rust-nix | 0.23.0-1 | — |
| Debian 13 | rust-nix | 0.23.0-1 | — |
| Debian 12 | rust-nix | 0.23.0-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | rust-nix | No fix yet | — |
| Ubuntu 26.04 LTS | rust-nix | No fix yet | — |
| Ubuntu 25.10 | rust-nix | No fix yet | — |
| Ubuntu 24.04 LTS | rust-nix | No fix yet | — |
| Ubuntu 22.04 LTS | rust-nix | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | rust-nix | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| crates.io | nix | >= 0.16.0, < 0.20.2 | 0.20.2 | GHSA-76w9-p8mg-j927 |
| crates.io | nix | >= 0.21.0, < 0.21.2 | 0.21.2 | GHSA-76w9-p8mg-j927 |
| crates.io | nix | >= 0.22.0, < 0.22.2 | 0.22.2 | GHSA-76w9-p8mg-j927 |
| crates.io | nix | >= 0.16.0, < 0.20.2 · >= 0.21.0-0, < 0.21.2 · >= 0.22.0-0, < 0.22.2 · >= 0.23.0-0, < 0.23.0 | 0.20.2, 0.21.2, 0.22.2, 0.23.0 | RUSTSEC-2021-0119 |