libvirt libxl/libxl_driver.c libxlDomainGetNumaParameters Invalid Free access control
CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
---|---|---|
8.9 | $0-$5k | 0.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.
Product
Type
Name
License
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 9.9VulDB Meta Temp Score: 8.9
VulDB Base Score: 9.9
VulDB Temp Score: 8.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
Name: Invalid FreeClass: 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-Day | unlock | unlock | unlock | unlock |
---|---|---|---|---|
Today | unlock | unlock | unlock | unlock |
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 Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: PatchStatus: 🔍
Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Patch: libvirt.org
Timeline
11/04/2013 🔍12/20/2013 🔍
12/20/2013 🔍
12/20/2013 🔍
12/20/2013 🔍
01/15/2014 🔍
01/21/2014 🔍
01/24/2014 🔍
01/30/2014 🔍
06/13/2014 🔍
06/08/2021 🔍
Sources
Advisory: avoid crashing if calling `virsh numatune' on inactive domainResearcher: 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: 🔍
Entry
Created: 01/21/2014 09:39 AMUpdated: 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
No comments yet. Languages: en.
Please log in to comment.