Bug 1721071 (CVE-2012-6711)
| Summary: | CVE-2012-6711 bash: heap-based buffer overflow during echo of unsupported characters | ||
|---|---|---|---|
| Product: | [Other] Security Response | Reporter: | Riccardo Schirone <rschiron> |
| Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
| Status: | CLOSED ERRATA | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | unspecified | CC: | admiller, aprajapa, kasal, kdudka, msweiker, security-response-team, svashisht |
| Target Milestone: | --- | Keywords: | Security |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | bash 4.3 | Doc Type: | If docs needed, set a value |
| Doc Text: |
A heap-based buffer overflow was discovered in bash when wide characters, not supported by the current locale set in LC_CTYPE environment variable, are printed through the echo built-in function. A local attacker, who can provide data to print through the `echo -e` built-in function, may use this flaw to crash a script or execute code with the privileges of the bash process.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-10-27 03:29:32 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1721851, 1721852 | ||
| Bug Blocks: | 1710592 | ||
|
Description
Riccardo Schirone
2019-06-17 09:15:34 UTC
Setting Attack Complexity (AC) to High (H) as it's required to use the `echo` built-in function with the `-e` option, which allows you to print unicode characters given the right bytes values. Moreover, restricted bash is not such a used feature and it is not generally considered a security feature as there are many ways to escape it. Acknowledgments: Name: Erez Turjeman u32cconv() should return the number of bytes written to the destination buffer and its return value is used to update a pointer in ansicstr(). However, when the locale set in LC_CTYPE does not support some wide character, the wctomb() function returns -1. In vulnerable versions, u32cconv() directly returns the negative value returned by wctomb(), which allows an attacker to move the buffer pointer before the allocated memory, overwriting other data in memory. Created bash tracking bugs for this issue: Affects: fedora-all [bug 1721852] Statement: Impact set to Moderate as the flaw requires the usage of `echo -e` built-in function with a string controlled by the attacker. Abusing this flaw would allow an attacker to, at most, execute code with the privileges of the bash process, which could be used e.g. to escape a restricted shell in case of a local attacker scenario or remotely execute code in case of a bash script that accepts untrusted input from the network. However we do not recommend to use bash scripts to handle untrusted data from the network. |