libvirt libxl/libxl_driver.c libxlDomainGetNumaParameters Invalid Free access control

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
8.9$0-$5k0.00

A vulnerability was found in libvirt (Virtualization Software) (unknown version). It has been classified as critical. This affects the function libxlDomainGetNumaParameters in the library libxl/libxl_driver.c. The manipulation with an unknown input leads to a access control vulnerability (Invalid Free). CWE is classifying the issue as CWE-264. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is:

The libxlDomainGetNumaParameters function in the libxl driver (libxl/libxl_driver.c) in libvirt before 1.2.1 does not properly initialize the nodemap, which allows local users to cause a denial of service (invalid free operation and crash) or possibly execute arbitrary code via an inactive domain to the virsh numatune command.

The weakness was presented 12/20/2013 by Dario Faggioli as avoid crashing if calling `virsh numatune' on inactive domain as confirmed posting (Mailing List). It is possible to read the advisory at redhat.com. This vulnerability is uniquely identified as CVE-2013-6457 since 11/04/2013. The exploitability is told to be difficult. It is possible to initiate the attack remotely. The requirement for exploitation is a authentication. Technical details and a public exploit are known. The attack technique deployed by this issue is T1068 according to MITRE ATT&CK. The reason for this vulnerability is this part of code:

# ./daemon/libvirtd -v
 *** Error in `/home/xen/libvirt.git/daemon/.libs/lt-libvirtd': munmap_chunk(): invalid pointer: 0x00007fdd42592666 ***
 ======= Backtrace: =========
 /lib64/libc.so.6(+0x7bbe7)[0x7fdd3f767be7]
 /lib64/libxenlight.so.4.3(libxl_bitmap_dispose+0xd)[0x7fdd2c88c045]
 /home/xen/libvirt.git/daemon/.libs/../../src/.libs/libvirt_driver_libxl.so(+0x12d26)[0x7fdd2caccd26]
 /home/xen/libvirt.git/src/.libs/libvirt.so.0(virDomainGetNumaParameters+0x15c)[0x7fdd4247898c]
 /home/xen/libvirt.git/daemon/.libs/lt-libvirtd(+0x1d9a2)[0x7fdd42ecc9a2]
 /home/xen/libvirt.git/src/.libs/libvirt.so.0(virNetServerProgramDispatch+0x3da)[0x7fdd424e9eaa]
 /home/xen/libvirt.git/src/.libs/libvirt.so.0(+0x1a6f38)[0x7fdd424e3f38]
 /home/xen/libvirt.git/src/.libs/libvirt.so.0(+0xa81e5)[0x7fdd423e51e5]
 /home/xen/libvirt.git/src/.libs/libvirt.so.0(+0xa783e)[0x7fdd423e483e]
 /lib64/libpthread.so.0(+0x7c53)[0x7fdd3febbc53]
 /lib64/libc.so.6(clone+0x6d)[0x7fdd3f7e1dbd]
The advisory points out:
libxl: avoid crashing if calling `virsh numatune' on inactive domain by, in libxlDomainGetNumaParameters(), calling libxl_bitmap_init() as soon as possible, which avoids getting to 'cleanup:', where libxl_bitmap_dispose() happens, without having initialized the nodemap, and hence crashing after some invalid free()-s:

It is declared as proof-of-concept. The vulnerability scanner Nessus provides a plugin with the ID 75266 (openSUSE Security Update : libvirt (openSUSE-SU-2014:0268-1)), 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 195783 (Ubuntu Security Notification for Libvirt Vulnerabilities (USN-2093-1)).

Applying a patch is able to eliminate this problem. The bugfix is ready for download at libvirt.org. A possible mitigation has been published immediately after the disclosure of the vulnerability. The vulnerability will be addressed with the following lines of code:

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 29aa6c7..d91744f 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -3958,6 +3958,8 @@ libxlDomainGetNumaParameters(virDomainPtr dom,
* the filtering on behalf of older clients that can't parse it. */
  flags &= ~VIR_TYPED_PARAM_STRING_OKAY;
 
+ libxl_bitmap_init(&nodemap);
+
  if (!(vm = libxlDomObjFromDomain(dom)))
     goto cleanup;
 
@@ -3972,8 +3974,6 @@ libxlDomainGetNumaParameters(virDomainPtr dom,
 
  priv = vm->privateData;
 
- libxl_bitmap_init(&nodemap);
-
  if ((*nparams) == 0) {
     *nparams = LIBXL_NUMA_NPARAM;
     ret = 0;

The vulnerability is also documented in the databases at X-Force (90446), Tenable (75266), SecurityFocus (BID 64963†), OSVDB (102254†) and Secunia (SA56308†). See VDB-11780, VDB-11995, VDB-11999 and VDB-13182 for similar entries. Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Productinfo

Type

Name

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 9.9
VulDB Meta Temp Score: 8.9

VulDB Base Score: 9.9
VulDB Temp Score: 8.9
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Name: Invalid Free
Class: Access control / Invalid Free
CWE: CWE-264
CAPEC: 🔍
ATT&CK: 🔍

Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Nessus ID: 75266
Nessus Name: openSUSE Security Update : libvirt (openSUSE-SU-2014:0268-1)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Port: 🔍

OpenVAS ID: 841696
OpenVAS Name: Ubuntu Update for libvirt USN-2093-1
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Patch
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍

Patch: libvirt.org

Timelineinfo

11/04/2013 🔍
12/20/2013 +46 days 🔍
12/20/2013 +0 days 🔍
12/20/2013 +0 days 🔍
12/20/2013 +0 days 🔍
01/15/2014 +26 days 🔍
01/21/2014 +6 days 🔍
01/24/2014 +3 days 🔍
01/30/2014 +6 days 🔍
06/13/2014 +134 days 🔍
06/08/2021 +2552 days 🔍

Sourcesinfo

Advisory: avoid crashing if calling `virsh numatune' on inactive domain
Researcher: Dario Faggioli
Status: Confirmed
Confirmation: 🔍

CVE: CVE-2013-6457 (🔍)
GCVE (CVE): GCVE-0-2013-6457
GCVE (VulDB): GCVE-100-12003

OVAL: 🔍

X-Force: 90446
SecurityFocus: 64963 - libvirt 'libxlDomainGetNumaParameters()' Function Local Denial of Service Vulnerability
Secunia: 56308 - libvirt "libxlDomainGetNumaParameters()" Invalid Free Vulnerability, Less Critical
OSVDB: 102254
Vulnerability Center: 43106 - Libvirt before 1.2.1 Remote DoS or Code Execution Vulnerability by Calling \x27Virsh Numatune\x27 on Inactive Domain, Medium

scip Labs: https://www.scip.ch/en/?labs.20161013
See also: 🔍

Entryinfo

Created: 01/21/2014 09:39 AM
Updated: 06/08/2021 01:57 PM
Changes: 01/21/2014 09:39 AM (79), 08/21/2017 08:50 AM (11), 06/08/2021 01:57 PM (3)
Complete: 🔍
Cache ID: 18:712:40

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!