Now on Demand Ransomware Resilience & Recovery Summit - All Sessions Available
Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

Remote Code Execution Flaw Impacts E2fsprogs Filesystem Utility

An out-of-bounds write bug in the E2fsprogs filesystem utility could lead to remote code execution, Cisco Talos security researchers reveal.

An out-of-bounds write bug in the E2fsprogs filesystem utility could lead to remote code execution, Cisco Talos security researchers reveal.

E2fsprogs is a set of utilities designed for interaction with ext2, ext3 and ext4 filesystems. Considered essential for Linux and Unix-like operating systems, the software ships by default on most Linux distributions.

One of E2fsprogs’ components is the e2fsck binary, which aims to fix corrupted filesystems, and which Cisco Talos found to contain the out-of-bounds write flaw.

The implementation of directories in ext2, 3 and 4 involves the use of hash trees for the unique mapping of files within a directory. The hash entries for the hash tree are contained within hash_entry struct, while the number of hash entries is contained within num_array.

To maintain the integrity and assumptions of a hash table, all the entries should be unique, a requirement that e2fsck enforces by appending the second file name in a collision with {~0, ~1, …, ~n}, depending on the number of duplicates, Talos says.

A temporary stack buffer is used to temporarily store mutated names to write them to the disk later on, and the utility then iterates over each hash_entry struct. When a collision is met, the length of the current file name is extracted and then the mutate_name function is used to perform changes.

What the security researchers discovered was that the process was prone to an out-of-bounds stack. The issue resides in the E2fsprogs e2fsck rehash.c mutate_name() function, resulting in the directory rehashing functionality being abused for code execution.

A specially crafted ext4 directory could be used to cause an out-of-bounds write on the stack, leading to code execution. In order to trigger the vulnerability, the attacker would need to corrupt a partition, Talos’ researchers explain.

Advertisement. Scroll to continue reading.

On 64-bit systems, exploitation is very unlikely, because the stack is not big enough and a user-controlled method for expanding the stack is required, the researchers explain.

On 32-bit versions, on the other hand, the end result is more dependent on the binary itself and on the manner it was compiled, Talos says.

Tracked as CVE-2019-5188 and featuring a CVSS score of 7.5, the vulnerability was disclosed to the vendor on December 18, 2019, and acknowledged on December 20. Versions 1.43.3 – 1.45.3 of E2fsprogs were found affected by this vulnerability. An update that patches the flaw was released this week.

Related: Code Execution Vulnerabilities Patched in Accusoft ImageGear

Related: Cisco Finds 11 Vulnerabilities in Schneider Electric Modicon Controllers

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

People on the Move

MSSP Dataprise has appointed Nima Khamooshi as Vice President of Cybersecurity.

Backup and recovery firm Keepit has hired Kim Larsen as CISO.

Professional services company Slalom has appointed Christopher Burger as its first CISO.

More People On The Move

Expert Insights

Related Content

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...

Vulnerabilities

A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...

Cybercrime

Patch Tuesday: Microsoft calls attention to a series of zero-day remote code execution attacks hitting its Office productivity suite.

Vulnerabilities

Patch Tuesday: Microsoft warns vulnerability (CVE-2023-23397) could lead to exploitation before an email is viewed in the Preview Pane.

IoT Security

A vulnerability affecting Dahua cameras and video recorders can be exploited by threat actors to modify a device’s system time.