Lucene search

K
githubGitHub Advisory DatabaseGHSA-W5W5-8VFH-XCJQ
HistoryApr 05, 2024 - 3:39 p.m.

whoami stack buffer overflow on several Unix platforms

2024-04-0515:39:19
CWE-121
GitHub Advisory Database
github.com
7
whoami crate
stack buffer overflow
unix platforms
illumos
solaris
bitrig
dragonflybsd
freebsd
netbsd
openbsd
passwd struct
denial of service
data corruption
exploit
vulnerability
unix platforms
whoami 1.5.0

7.7 High

AI Score

Confidence

High

With versions of the whoami crate >= 0.5.3 and < 1.5.0, calling any of these functions leads to an immediate stack buffer overflow on illumos and Solaris:

  • whoami::username
  • whoami::realname
  • whoami::username_os
  • whoami::realname_os

With versions of the whoami crate >= 0.5.3 and < 1.0.1, calling any of the above functions also leads to a stack buffer overflow on these platforms:

  • Bitrig
  • DragonFlyBSD
  • FreeBSD
  • NetBSD
  • OpenBSD

This occurs because of an incorrect definition of the passwd struct on those platforms.

As a result of this issue, denial of service and data corruption have both been observed in the wild. The issue is possibly exploitable as well.

This vulnerability also affects other Unix platforms that aren’t Linux or macOS.

This issue has been addressed in whoami 1.5.0.

For more information, see this GitHub issue.

Affected configurations

Vulners
Node
whoamiRange0.5.3β‰₯
OR
whoamiRange<1.5.0
CPENameOperatorVersion
whoamige0.5.3
whoamilt1.5.0

7.7 High

AI Score

Confidence

High