header-logo
Suggest Exploit
vendor:
VirtualBox
by:
Renorobert
8.8
CVSS
HIGH
Double Fetch Vulnerability in VirtualBox Video Acceleration (VBVA) feature
119
CWE
Product Name: VirtualBox
Affected Version From: VirtualBox 5.2.6.r120293
Affected Version To: VirtualBox 5.2.6.r120293
Patch Exists: YES
Related CWE: CVE-2018-2844
CPE: a:oracle:virtualbox
Other Scripts: N/A
Platforms Tested: Linux
2018

From Compiler Optimization to Code Execution in Oracle VirtualBox

Oracle fixed some of the issues reported in VirtualBox during the Oracle Critical Patch Update - April 2018. CVE-2018-2844 was an interesting double fetch vulnerability in VirtualBox Video Acceleration (VBVA) feature affecting Linux hosts. VBVA feature works on top of VirtualBox Host-Guest Shared Memory Interface (HGSMI), a shared memory implemented using Video RAM buffer. The VRAM buffer is at physical address 0xE0000000. The exploit was tested with Ubuntu Server as Guest and Ubuntu Desktop as host running VirtualBox 5.2.6.r120293. The proof-of-concept exploit code with process continuation and connect back over network can be found at virtualbox-cve-2018-2844.

Mitigation:

Blacklisting vboxvideo reduces activity on VRAM and keeps the payload intact.
Source

Exploit-DB raw data:

Oracle fixed some of the issues I reported in VirtualBox during the Oracle Critical Patch Update - April 2018. CVE-2018-2844 was an interesting double fetch vulnerability in VirtualBox Video Acceleration (VBVA) feature affecting Linux hosts. VBVA feature works on top of VirtualBox Host-Guest Shared Memory Interface (HGSMI), a shared memory implemented using Video RAM buffer. The VRAM buffer is at physical address 0xE0000000 

I didn't see such optimization in VirtualBox for Windows and OSX. Only Linux hosts are affected. 

Find a value in VBoxDD.so (assume as some fake jump table), which during relative address calculation will point into the 16MB shared VRAM buffer. For the proof-of-concept exploit fill the entire VRAM with NOP's and place the shellcode at the final pages of the mapping. No ASLR bypass is needed since the jump is relative. 

In the guest, add vboxvideo to /etc/modprobe.d/blacklist.conf. vboxvideo.ko driver has a custom allocator to manage VRAM memory and HGSMI guest side implementations. Blacklisting vboxvideo reduces activity on VRAM and keeps the payload intact. The exploit was tested with Ubuntu Server as Guest and Ubuntu Desktop as host running VirtualBox 5.2.6.r120293.

The proof-of-concept exploit code with process continuation and connect back over network can be found at virtualbox-cve-2018-2844

https://www.voidsecurity.in/2018/08/from-compiler-optimization-to-code.html
https://github.com/renorobert/virtualbox-cve-2018-2844

Download: https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/45372.zip