Miggo Logo

GHSA-wgrg-5h56-jg27: Out-of-bounds write in nix::unistd::getgrouplist

N/A

CVSS Score

Basic Information

CVE ID
-
EPSS Score
-
CWE
-
Published
6/17/2022
Updated
6/13/2023
KEV Status
No
Technology
TechnologyRust

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
nixrust>= 0.16.0, < 0.20.20.20.2
nixrust>= 0.21.0, < 0.21.20.21.2
nixrust>= 0.22.0, < 0.22.20.22.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability explicitly occurs in nix's getgrouplist() implementation as described in CVE/GHSA details. The root cause is the mismatch between buffer capacity and ngroups value passed to libc after buffer resizing. The function's retry logic (doubling buffer without updating ngroups) directly matches the vulnerability description. Multiple independent sources (GitHub advisory, RustSec, and original issue) all point to this specific function as the vulnerable component.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

On **rt*in pl*t*orms, i* * us*r **s mor* t**n ** *roups, t** `nix::unist*::**t*rouplist` *un*tion will **ll t** li** `**t*rouplist` *un*tion wit* * l*n*t* p*r*m*t*r *r**t*r t**n t** siz* o* t** *u***r it provi**s, r*sultin* in *n out-o*-*oun*s writ*

Reasoning

T** vuln*r**ility *xpli*itly o**urs in nix's `**t*rouplist()` impl*m*nt*tion *s **s*ri*** in *V*/**S* **t*ils. T** root **us* is t** mism*t** **tw**n *u***r **p**ity *n* n*roups v*lu* p*ss** to `li**` **t*r *u***r r*sizin*. T** *un*tion's r*try lo*i*