vendor:
OpenBSD
by:
caddis
7.2
CVSS
HIGH
Buffer Overflow
120
CWE
Product Name: OpenBSD
Affected Version From: OpenBSD 2.7
Affected Version To: OpenBSD 2.7
Patch Exists: YES
Related CWE: N/A
CPE: o:openbsd:openbsd:2.7
Metasploit:
N/A
Other Scripts:
N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References:
N/A
Nuclei Metadata: N/A
Platforms Tested: OpenBSD
2000
fstat local root exploit (OpenBSD 2.7)
A user definable environment variable (PWD, parent working directory) is passed as the only argument to a *printf() function within fstat. As a result, it is possible for a user to exec fstat with a value for the PWD variable that contains malicious format specifiers. These format specifiers could be layed out in the environment variable in a way that causes the *printf function interpreting them to overwrite certain bytes on the stack (like those that the return address of the function called is composed of) and manipulate the flow of execution.
Mitigation:
Ensure that user-supplied input is properly validated and sanitized before being passed to a *printf() function.