JLSEC-2026-2248: Buffer Overflow
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.
Affected Software
Event History
Frequently Asked Questions
What conditions are required for exploitation?
Exploitation requires local access and the ability to control both the buffer and size supplied to getcwd() by a setuid program. The vulnerable condition occurs when the buffer size is exactly 1.
What is the likely impact if exploitation succeeds?
The memory corruption may allow arbitrary code execution in the context of the affected setuid program. This could enable a local attacker to escalate privileges on the system.
Are ordinary non-privileged uses of getcwd() the primary concern?
The described privilege-escalation scenario specifically depends on a setuid program passing attacker-controlled buffer input and size to getcwd(). Local users able to influence such calls are the relevant exposure group.