CVE-2021-3999 Memory corruption in glibc
A local attacker can exploit an off-by-one error in glibc's getcwd function to execute arbitrary code and escalate privileges.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-3999?
CVE-2021-3999 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 24 Aug 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
A flaw was found in glibc. An off-by-one buffer overflow and underflow in getcwd() may lead to memory corruption when the size of the buffer is exactly 1. A local attacker who can control the input buffer and size passed to getcwd() in a setuid program could use this flaw to potentially execute arbitrary code and escalate their privileges on the system.
Weakness: CWE-193
Which versions are affected by CVE-2021-3999?
It affects 10 products.
Products include Debian Debian Linux, Gnu Glibc, Netapp E-Series Performance Analyzer, Netapp H300s Firmware, Netapp H410c Firmware, Netapp H410s Firmware and 4 more.
How do I fix CVE-2021-3999?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2021-3999 being exploited?
There is no known exploitation of CVE-2021-3999 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as CLSA-2022-1648138064, CLSA-2022-1648138117, CLSA-2022-1648147764, CLSA-2022-1648149189, CLSA-2022-1648149396, DEBIAN-CVE-2021-3999 and 3 more.