unrar up to 5.5.4 DestPos integer overflow

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.
7.7$0-$5k0.00

A vulnerability classified as very critical has been found in unrar up to 5.5.4. Affected is an unknown code block. The manipulation of the argument DestPos as part of a Negative Value leads to a integer overflow vulnerability. CWE is classifying the issue as CWE-190. The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. This is going to have an impact on confidentiality, integrity, and availability. CVE summarizes:

A VMSF_DELTA memory corruption was discovered in unrar before 5.5.5, as used in Sophos Anti-Virus Threat Detection Engine before 3.37.2 and other products, that can lead to arbitrary code execution. An integer overflow can be caused in DataSize+CurChannel. The result is a negative value of the "DestPos" variable, which allows the attacker to write out of bounds when setting Mem[DestPos].

The bug was discovered 06/22/2017. The weakness was shared 06/22/2017 by Tavis Ormandy (Website). The advisory is shared for download at nakedsecurity.sophos.com. This vulnerability is traded as CVE-2012-6706 since 06/22/2017. It is possible to launch the attack remotely. The exploitation doesn't require any form of authentication. Technical details and a public exploit are known. The current price for an exploit might be approx. USD $0-$5k (estimation calculated on 10/20/2019). The reason for this vulnerability is this part of code:

case VMSF_DELTA:
  {
	int DataSize=R[4],Channels=R[0],SrcPos=0,Border=DataSize*2;
	if ((uint)DataSize>=VM_MEMSIZE/2)
	  break;

	// Bytes from same channels are grouped to continual data blocks,
	// so we need to place them back to their interleaving positions.
	for (int CurChannel=0;CurChannel<Channels;CurChannel++)
	{
	  byte PrevByte=0;
	  for (int DestPos=DataSize+CurChannel;DestPos<Border;DestPos+=Channels)
		Mem[DestPos]=(PrevByte-=Mem[SrcPos++]);
	}
  }
  break;
The advisory points out:
It appears that the VMSF_DELTA memory corruption that was reported to Sophos AV in 2012 (and fixed there) was actually inherited from upstream unrar. For unknown reasons the information did not reach upstream rar or was otherwise lost, and the bug seems to have persisted there to this day.

A public exploit has been developed by Google Security Research in Base64 and been published 1 days after the advisory. The exploit is shared for download at github.com. It is declared as proof-of-concept. As 0-day the estimated underground price was around $25k-$100k. The vulnerability scanner Nessus provides a plugin with the ID 101065 (Debian DLA-1003-1 : unrar-nonfree security update), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Debian Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 11893 (McAfee Web Gateway Multiple Vulnerabilities (SB10205)). The code used by the exploit is:

UmFyIRoHAPlOcwAADgAAAAAAAAAAMAh0AAAmAI4AAAAAAAAAAhBBUiEAAAAAHQAGAAAAACBzdGRv
dXQgIVUMzRDNmBGByDAda+AXaSv4KvQr1K/oejL05mXmXmww5tEk8gA9k8nmieyeyeswuOR6cx69
a2Hd6zQwu3aoMDDwMEswADAAMD4P938w+dydoRFwAmwAAAAAvv////+/////+9W3QFgAAQAGAAAA
Ooimhd12AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Upgrading to version 5.5.5 eliminates this vulnerability. A possible mitigation has been published 5 days after the disclosure of the vulnerability.

The vulnerability is also documented in the databases at Tenable (101065) and Exploit-DB (42245). The entries 6868, 6865, 6866 and 6870 are related to this item.

Affected

  • Sophos Anti-Virus Threat Detection Engine up to 3.37.1

Productinfo

Name

Version

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB CVSS-B Score: 🔍
VulDB CVSS-BT Score: 🔍
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 8.5
VulDB Meta Temp Score: 8.2

VulDB Base Score: 7.3
VulDB Temp Score: 6.6
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 9.8
NVD Vector: 🔍

CVSSv2info

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

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

NVD Base Score: 🔍

Exploitinginfo

Class: Integer overflow
CWE: CWE-190 / CWE-189
ATT&CK: Unknown

Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Google Security Research
Programming Language: 🔍
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Nessus ID: 101065
Nessus Name: Debian DLA-1003-1 : unrar-nonfree security update
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍

OpenVAS ID: 803322
OpenVAS Name: McAfee Web Gateway Multiple Vulnerabilities (SB10205)
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Exploit-DB: 🔍

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

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

Upgrade: unrar 5.5.5

Timelineinfo

11/06/2012 🔍
06/22/2017 +1689 days 🔍
06/22/2017 +0 days 🔍
06/22/2017 +0 days 🔍
06/22/2017 +0 days 🔍
06/22/2017 +0 days 🔍
06/23/2017 +1 days 🔍
06/23/2017 +0 days 🔍
06/27/2017 +4 days 🔍
06/28/2017 +1 days 🔍
10/20/2019 +844 days 🔍

Sourcesinfo

Advisory: nakedsecurity.sophos.com
Researcher: Tavis Ormandy
Status: Confirmed
Confirmation: 🔍

CVE: CVE-2012-6706 (🔍)
SecurityTracker: 1027725

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

Entryinfo

Created: 06/22/2017 19:10
Updated: 10/20/2019 09:58
Changes: 06/22/2017 19:10 (92), 10/20/2019 09:58 (3)
Complete: 🔍

Discussion

No comments yet. Languages: en.

Please log in to comment.

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!