Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Cloud Security

rkt Container Runtime Flaws Give Root Access to Host

Unpatched vulnerabilities found in the rkt container runtime can be exploited by an attacker to escape the container and gain root access to the host. 

Unpatched vulnerabilities found in the rkt container runtime can be exploited by an attacker to escape the container and gain root access to the host. 

The flaws can be exploited to compromise the host when a user executes the ‘rkt enter’ command (which is the equivalent of ‘docker exec’) into an attacker-controlled pod, Yuval Avrahami, a security researcher at Twistlock, explains. 

An open source container runtime and a CNCF incubating project created by CoreOS, rkt is widely appreciated. The runtime’s basic unit of execution is a pod, which includes multiple containers running in a shared context, the researcher explains

At the moment, the project no longer appears to be under active development, following the acquisition of CoreOS by RedHat in mid-2018. Although an open source project, rkt does not appear to have many contributors. 

The ‘rkt enter’ command, the researcher notes, allows users to execute binaries in a running container. Such binaries run as root, with all capabilities and no seccomp filtering or cgroup isolation applied, being only restricted by namespaces. 

Because of that, it is possible to escape the container, and this is what the discovered vulnerabilities allow for, Avrahami explains. 

The flaws are tracked as CVE-2019-10144 (processes run with `rkt enter` are given all capabilities during stage 2), CVE-2019-10145 (processes run with `rkt enter` do not have seccomp filtering during stage 2), and CVE-2019-10147 (processes run with `rkt enter` are not limited by cgroups during stage 2). 

To exploit the bugs, an attacker requires root access to the container. Thus, when the user runs the ‘rkt enter’ command, the attacker can overwrite binaries and libraries in the container to ensure that the spawned process runs malicious code instead. 

Advertisement. Scroll to continue reading.

For that, they need to overwrite /bin/bash and libc.so.6 in the container. These represent the default executed binary when none other was specified in the ‘rkt enter’ command, and the library likely to be loaded by the spawned process. 

“Once an attacker is running in the context of a container process spawned by ‘rkt enter’, he can escape the container and gain root access on the host with relative ease, as he runs with all capabilities, no seccomp filtering and without cgroup isolation,” the security researcher explains. 

One exploitation scenario involves mounting the host root directory using the ‘mknod’ and ‘mount’ syscalls, which would provide them with root access on the host. This attack also highlights the purpose of the isolation features lacking in the ‘rkt enter’ command.

The security researcher has published two videos to illustrate the three vulnerabilities and the aforementioned attack scenario

The security researcher has contacted RedHat and CoreOS to responsibly disclose these vulnerabilities, but was informed that RedHat had no active plan/timeline for addressing the issues. They instead encouraged Avrahami to post info on the bugs on GitHub, for the community to engage in any remediation operations.

“While investigating rkt I also discovered a way to create malicious ACI/OCI images that will compromise the host when run. Although this is certainly not ideal, malicious images are not a part of rkt’s threat module. Running images from an untrusted source is not aligned with rkt’s recommendations nor proper use,” the researcher notes. 

Related: Docker Vulnerability Gives Arbitrary File Access to Host

Related: No Root Password for 20% of Popular Docker Containers

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

Expert Insights

Related Content

Application Security

Cycode, a startup that provides solutions for protecting software source code, emerged from stealth mode on Tuesday with $4.6 million in seed funding.

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...

CISO Conversations

SecurityWeek talks to Billy Spears, CISO at Teradata (a multi-cloud analytics provider), and Lea Kissner, CISO at cloud security firm Lacework.

Cybercrime

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