SB2014100209 - Off-by-one error in bash (Alpine package)
Published: October 2, 2014
Security Bulletin ID
SB2014100209
Severity
Critical
Patch available
YES
Number of vulnerabilities
1
Exploitation vector
Remote access
Highest impact
Code execution
Breakdown by Severity
- Low
- Medium
- High
- Critical
Description
This security bulletin contains information about 1 security vulnerability.
1) Off-by-one error (CVE-ID: CVE-2014-7187)
The vulnerability allows a remote attacker to execute arbitrary code on the target system.
The weakness exists due to off-by-one-error when handling deeply nested flow control constructs. A remote attacker can trigger memory corruption and execute arbitrary code with privileges of the current user.
Exploitation example:
(for x in {1..200} ; do echo "for x$x in ; do :"; done; for x in {1..200} ; do echo done ; done) | bash ||
echo "CVE-2014-7187 vulnerable, word_lineno"
Successful exploitation results in arbitrary code execution on the vulnerable system.
Note: this vulnerability was being actively exploited.
Remediation
Install update from vendor's website.
References
- https://git.alpinelinux.org/aports/commit/?id=c5620781d3e7f795abf791b2141830d90835c255
- https://git.alpinelinux.org/aports/commit/?id=5eb71d2da76922363cee1f48af6452c6be607b0e
- https://git.alpinelinux.org/aports/commit/?id=8f16f06990c6cf37335a37903d8907f4078a9b38
- https://git.alpinelinux.org/aports/commit/?id=2fb12d286710e300e1793ecbce11a548beda713b