Skip to content
OpenAdvisories
Medium · 6.7 CVE-2021-45707 EUVD-2022-0497GHSA-76w9-p8mg-j927GHSA-wgrg-5h56-jg27RUSTSEC-2021-0119

Out-of-bounds Write in nix

Published Dec 26, 2021 · Updated Aug 4, 2024 · Assigned by mitre

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.

ReleasePackageFixed inAdvisory
Debian 14 rust-nix 0.23.0-1 —
Debian 13 rust-nix 0.23.0-1 —
Debian 12 rust-nix 0.23.0-1 —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS rust-nix No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
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

References