Can the Linux Stack Clash Vulnerability Affect Containers?
GLEN KOSAKA Container Security Docker Security Container Threats Leave a Comment
The recently discovered ‘Stack Clash’ vulnerability in Linux-based systems is another critical security issue like Dirty Cow, but can the stack clash vulnerability affect containers, and what could an attacker do?
The short answer is yes, an attacker could exploit the vulnerability to gain root privileges within a container, but not necessarily be able to break out from the container. However, if the exploit occurs in the user space on the host, the escalation to root on the linux host itself is a critical security event which the attacker could use to compromise running containers or the Docker daemon itself.
The Stack Clash Vulnerability
This vulnerability (CVE-2010-2240) was recently discovered by security vendor Qualys researchers and has been named “Stack Clash” because it involves “clashing” the stack with another memory region, such as the heap. A flaw was found in the way memory was being allocated on the stack for user space binaries, which could allow an attacker to jump over the stack guard gap. This could cause controlled memory corruption on the process stack or the adjacent memory region, and thus increase their privileges on the system.
Stack guard-pages, which were designed to prevent such issues, can be bypassed by Stack Clash, as demonstrated by the Qualys researchers. Affected Linux distributions include Red Hat, Debian, Ubuntu, SUSE, and CentOS, and most distributions have issued fixes already. While this is a local exploit in the user space, it can still give attackers a foothold into the operating system or kernel. Stack Clash could be used with other exploits to wreak even more havoc on systems and potentially move laterally. For example, a recent sudo vulnerability (CVE-2017-100367) could be combined with Stack Clash to be able to run arbitrary code with root privileges.
Stack Clash in Containers
Although Stack Clash is a user space exploit which in a container would be confined to the container, it can still be dangerous. If container security settings, such as namespaces and cgroups, are configured properly, even if the attacker escalated to root within the container they wouldn’t be able to escape the container. But that’s a big IF. Attackers could combine Stack Clash with another vulnerability that could break out of the container or the VM, starting what is typically called the security ‘kill chain.’
Securing Containers and Hosts Against Stack Clash and Other Exploits
Because it’s possible to have the Stack Clash vulnerability affect containers, precautions against a resulting container break out should be taken. There are several points where the vulnerability and a real-time exploit can be detected, starting with scanning of the host and container and adding break out detection during run-time.
A specialized container security solution like NeuVector can provide multiple detection and prevention points against these types of exploits:
- Scan all hosts and containers in real-time for the vulnerability
- Monitor hosts and containers for privilege escalations during run-time
- Detect break outs or other attempts to move laterally from hosts or containers
- Block suspicious connections or quarantine suspicious containers.
It’s always advisable to periodically audit and test security settings against industry standard security benchmarks such as Docker Bench and the Kubernetes CIS Benchmark. However, it’s not always possible to detect vulnerabilities before they are exploited, especially for zero-day attacks. That is why a whitelist-based run-time security solution which can distinguish authorized connections from suspicious ones is a critical requirement for securing containers.
Categories
- Container Security (75)
- Cloud Security (35)
- Docker Security (30)
- Kubernetes Security (26)
- Press Releases (21)
- Container Threats (18)
- Network Security (18)
- Articles (14)
- Kubernetes (13)
- Vulnerabilities (13)
- Container Networking (8)
- Container Firewall (7)
- Exploits (7)
- RedHat OpenShift (7)
- cloud-native security (7)
- AWS (6)
- Partnerships (6)
- Alerts (4)
- Ebooks + Guides (4)
- data loss prevention (4)
- security automation (4)
- service mesh (4)
- Cloud services (3)
- Compliance (3)
- Cyber Attacks (3)
- Kubernetes system (3)
- Microservices (3)
- NeuVector Product (3)
- Serverless (3)
- dlp (3)
- AWS ECS (2)
- CI/CD (2)
- CIS Benchmark (2)
- Customer Stories (2)
- Docker (2)
- Infrastructure as Code (2)
- Istio (2)
- Open Source (2)
- PCI Compliance (2)
- PCI-DSS (2)
- Slider Ebooks & Guides (2)
- Terraform (2)
- VMware (2)
- run-time (2)
- security mesh (2)
- shift left (2)
- waf (2)
- Alibaba (1)
- App Mesh (1)
- Backdoor (1)
- Banking (1)
- Black Duck Software (1)
- Docker Hub (1)
- Docker Networking (1)
- Docker container firewall (1)
- ECS (1)
- EKS (1)
- Events (1)
- Financial Services (1)
- GDPR (1)
- IBM Cloud (1)
- Internet of Things (1)
- JFrog (1)
- Jenkins (1)
- Knative (1)
- OpenShift (1)
- Secrets (1)
- VMware Photon (1)
- Virtual Patching (1)
- Webinar (1)
- admission control (1)
- application security (1)
- container risk score (1)
- cpu optimization (1)
- crypto (1)
- data breach (1)
- dpi (1)
- grafana (1)
- linkerd2 (1)
- micro-perimeter (1)
- monitoring (1)
- pci (1)
- prometheus (1)
- rancher (1)
- real-time containers (1)
- sdlc (1)
- sensitive data (1)