GNU C Library 2.19 spawn_faction_addopen.c xc_cpupool_getinfo code injection

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.9 | $0-$5k | 0.00 |
Summary
A vulnerability was found in GNU C Library 2.19. It has been rated as problematic. This affects the function xc_cpupool_getinfo of the file posix/spawn_faction_addopen.c. Performing a manipulation results in code injection.
This vulnerability is reported as CVE-2014-4043. Moreover, an exploit is present.
Upgrading the affected component is advised.
Details
A vulnerability was found in GNU C Library 2.19 (Software Library). It has been classified as critical. This affects the function xc_cpupool_getinfo of the file posix/spawn_faction_addopen.c. The manipulation with an unknown input leads to a code injection vulnerability. CWE is classifying the issue as CWE-94. The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is:
The posix_spawn_file_actions_addopen function in glibc before 2.20 does not copy its path argument in accordance with the POSIX specification, which allows context-dependent attackers to trigger use-after-free vulnerabilities.
The issue has been introduced in 02/07/2014. The weakness was disclosed 06/11/2014 by David Reid, Alex Gaynor and and Glyph Lefkowitz as Bug 17048 as confirmed bug report (Bugzilla). It is possible to read the advisory at sourceware.org. The public release has been coordinated in cooperation with GNU. This vulnerability is uniquely identified as CVE-2014-4043 since 06/12/2014. Attacking locally is a requirement. The successful exploitation requires a authentication. Technical details and a public exploit are known. The attack technique deployed by this issue is T1059 according to MITRE ATT&CK.
A public exploit has been developed by Alex Gaynor in ANSI C and been published immediately after the advisory. The exploit is shared for download at sourceware.org. It is declared as proof-of-concept. The vulnerability was handled as a non-public zero-day exploit for at least 124 days. During that time the estimated underground price was around $0-$5k. The vulnerability scanner Nessus provides a plugin with the ID 76604 (SuSE 11.3 Security Update : glibc (SAT Patch Number 9477)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family SuSE Local Security Checks. The commercial vulnerability scanner Qualys is able to test this issue with plugin 195576 (Ubuntu Security Notification for Eglibc Vulnerabilities (USN-2306-1)). The code used by the exploit is:
int main() {
int res;
posix_spawn_file_actions_t fa;
posix_spawn_file_actions_init(&fa);
char *orig_path = "/tmp/afddsa";
char *path = malloc(strlen(orig_path) + 1);
strcpy(path, orig_path);
path[strlen(orig_path)] = '\0';
res = posix_spawn_file_actions_addopen(
&fa, 1, path, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
assert(res == 0);
memset(path, 0, strlen(orig_path));
free(path);
char *argv[] = {"/bin/echo", NULL};
pid_t pid;
res = posix_spawn(
&pid,
"/bin/echo",
&fa,
NULL,
argv,
environ
);
assert(res == 0);
int status;
wait4(pid, &status, 0, NULL);
printf("%d\n", WEXITSTATUS(status));
}Upgrading to version 2.20 eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at sourceware.org. The best possible mitigation is suggested to be upgrading to the latest version. The vulnerability will be addressed with the following lines of code:
#include <string.h>
The vulnerability is also documented in the databases at X-Force (93784), Tenable (76604), SecurityFocus (BID 68006†), Secunia (SA58697†) and Vulnerability Center (SBV-45742†). Further details are available at seclists.org. The entries VDB-67049 and VDB-67286 are pretty similar. Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Product
Type
Vendor
Name
Version
License
Website
- Vendor: https://www.gnu.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.8VulDB Meta Temp Score: 7.9
VulDB Base Score: 8.8
VulDB Temp Score: 7.9
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
NVD Base Score: 🔍
Exploiting
Class: Code injectionCWE: CWE-94 / CWE-74 / CWE-707
CAPEC: 🔍
ATT&CK: 🔍
Physical: Partially
Local: Yes
Remote: Yes
Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Alex Gaynor
Programming Language: 🔍
Download: 🔍
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 76604
Nessus Name: SuSE 11.3 Security Update : glibc (SAT Patch Number 9477)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Port: 🔍
OpenVAS ID: 703169
OpenVAS Name: Debian Security Advisory DSA 3169-1 (eglibc - security update)
OpenVAS File: 🔍
OpenVAS Family: 🔍
Qualys ID: 🔍
Qualys Name: 🔍
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Exploit Delay Time: 🔍
Upgrade: C Library 2.20
Patch: sourceware.org
Timeline
02/07/2014 🔍06/11/2014 🔍
06/11/2014 🔍
06/11/2014 🔍
06/12/2014 🔍
06/13/2014 🔍
06/13/2014 🔍
06/13/2014 🔍
07/20/2014 🔍
08/11/2014 🔍
10/06/2014 🔍
06/22/2021 🔍
Sources
Vendor: gnu.orgAdvisory: Bug 17048
Researcher: David Reid, Alex Gaynor, and Glyph Lefkowitz
Status: Confirmed
Confirmation: 🔍
Coordinated: 🔍
CVE: CVE-2014-4043 (🔍)
GCVE (CVE): GCVE-0-2014-4043
GCVE (VulDB): GCVE-100-13587
OVAL: 🔍
X-Force: 93784 - GNU C Library posix_spawn_file_actions_addopen code execution, High Risk
SecurityFocus: 68006 - GNU glibc 'xc_cpupool_getinfo()' Function Use After Free Memory Corruption Vulnerability
Secunia: 58697 - GNU C Library "posix_spawn_file_actions_addopen()" Denial of Service Vulnerabili, Less Critical
Vulnerability Center: 45742 - GNU C Library Remote Code Execution due to a Use After Free Error in \x27posix_spawn_file_actions_addopen\x27, High
scip Labs: https://www.scip.ch/en/?labs.20161013
Misc.: 🔍
See also: 🔍
Entry
Created: 06/13/2014 15:04Updated: 06/22/2021 20:43
Changes: 06/13/2014 15:04 (94), 06/04/2017 10:36 (7), 06/22/2021 20:43 (3)
Complete: 🔍
Cache ID: 216:5B6:103
No comments yet. Languages: en.
Please log in to comment.