GPU VulnDB

Database/Kernel, userspace & hypervisor

glibc: wordexp() reads out of bounds on a crafted pattern, crashing or leaking memory

CVSS 9.1CVE-2021-35942Kernel, userspace & hypervisorcurated

Impact

wordexp() in glibc through 2.33 uses atoi() instead of strtoul() when parsing positional parameters, so a crafted pattern can push the parser out of bounds and either crash the caller or expose adjacent heap memory. The exposure on a GPU node depends entirely on whether anything privileged calls wordexp() on attacker-supplied text - most daemons do not, and the function is mainly reached through shell-like expansion in job wrappers, prologue/epilogue scripts and legacy service code. Where such a path exists on a scheduler or login node, a tenant who controls the expanded string gets a service crash or a small information leak in the context of whatever runs the expansion. Because glibc is linked into every process on the host, the fix is a system-wide library update rather than a change to one service.

Who can reach it

A local or remote user who can get an untrusted string passed to wordexp() by a privileged or shared process; no authentication is needed beyond whatever reaches that code path. There is no exposure on a node where nothing calls wordexp() on foreign input.

What to do

Update glibc to a version carrying the upstream fix (sourceware commit 5adda61f62b7) from your distribution - Debian LTS, Gentoo and NetApp have shipped advisories. Because glibc is loaded by every running process, the patch only fully takes effect after the processes that use it restart; on a GPU node that means either a rolling restart of the affected daemons or a drain and reboot during the next maintenance window. The advisories do not name a single upstream release with the fix, so track your distribution's package version.

References

Related entries

All Kernel, userspace & hypervisor entries

This entry is curated: imported from vendor advisories with machine assistance, not yet individually verified. Confirm against your vendor's advisory before acting, and report anything wrong.