Ruby 1.9.3/2.0.0/2.1.0 string.c str_buf_cat Long String data processing

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

Summaryinfo

A vulnerability marked as problematic has been reported in Ruby 1.9.3/2.0.0/2.1.0. This vulnerability affects the function str_buf_cat of the file string.c. This manipulation as part of Long String causes data processing. This vulnerability appears as CVE-2014-3916. In addition, an exploit is available. It is suggested to upgrade the affected component.

Detailsinfo

A vulnerability has been found in Ruby 1.9.3/2.0.0/2.1.0 (Programming Language Software) and classified as problematic. Affected by this vulnerability is the function str_buf_cat of the file string.c. The manipulation as part of a Long String leads to a data processing vulnerability. The CWE definition for the vulnerability is CWE-19. As an impact it is known to affect availability. The summary by CVE is:

The str_buf_cat function in string.c in Ruby 1.9.3, 2.0.0, and 2.1 allows context-dependent attackers to cause a denial of service (segmentation fault and crash) via a long string.

The weakness was presented 04/09/2014 by Hiroshi Shirosaki as Revision 45534 as confirmed commit (Trunk). It is possible to read the advisory at bugs.ruby-lang.org. This vulnerability is known as CVE-2014-3916 since 05/29/2014. The attack can be launched remotely. The exploitation doesn't need any form of authentication. Technical details and also a public exploit are known. Responsible for the vulnerability is the following code:

capa = (total + 4095) / 4096;

A public exploit has been developed by Ramon de C Valle and been published 2 months after the advisory. It is possible to download the exploit at seclists.org. It is declared as proof-of-concept. The code used by the exploit is:

A = ""
1000000.times do |i|
  A << "a" * 100000
end

Upgrading eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at bugs.ruby-lang.org. The best possible mitigation is suggested to be upgrading to the latest version. A possible mitigation has been published immediately after the disclosure of the vulnerability. The vulnerability will be addressed with the following lines of code:

capa = LONG_MAX - termlen;

The vulnerability is also documented in the databases at X-Force (93505) and SecurityFocus (BID 67705†). Be aware that VulDB is the high quality source for vulnerability data.

Productinfo

Type

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.3
VulDB Meta Temp Score: 4.8

VulDB Base Score: 5.3
VulDB Temp Score: 4.8
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

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

NVD Base Score: 🔍

Exploitinginfo

Class: Data processing
CWE: CWE-19
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Ramon de C Valle
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

OpenVAS ID: 801760
OpenVAS Name: Ruby str_buf_cat function Denial-of-Service Vulnerability (Windows)
OpenVAS File: 🔍
OpenVAS Family: 🔍

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

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

Patch: bugs.ruby-lang.org

Timelineinfo

04/09/2014 🔍
04/09/2014 +0 days 🔍
05/27/2014 +48 days 🔍
05/27/2014 +0 days 🔍
05/29/2014 +2 days 🔍
06/03/2014 +5 days 🔍
11/16/2014 +166 days 🔍
10/19/2018 +1433 days 🔍

Sourcesinfo

Advisory: Revision 45534
Researcher: Hiroshi Shirosaki
Status: Confirmed

CVE: CVE-2014-3916 (🔍)
GCVE (CVE): GCVE-0-2014-3916
GCVE (VulDB): GCVE-100-13423
X-Force: 93505 - Ruby str_buf_cat() denial of service, Medium Risk
SecurityFocus: 67705 - Ruby 'string.c' Remote Memory Corruption Vulnerability

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

Entryinfo

Created: 06/03/2014 16:52
Updated: 10/19/2018 08:11
Changes: 06/03/2014 16:52 (71), 10/19/2018 08:11 (4)
Complete: 🔍
Cache ID: 216::103

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to stay up to date on a daily basis?

Enable the mail alert feature now!