SecuritylabAugust 25, 2026🇷🇺Translated from Russian

Dirty COW CVE-2016-5195: How a 2016 Linux Kernel Race Condition Still Enables Privilege Escalation in Embedded Systems

The 2016 discovery of CVE-2016-5195, widely known as Dirty COW, revealed a race condition in the Linux kernel’s copy-on-write mechanism. The flaw enabled a local attacker to modify memory pages that should have remained read-only, providing a primitive for writing to protected files or memory regions.

Although the vulnerability was fixed in October 2016 for mainstream distributions, many embedded devices continue to run unpatched kernels for years. Routers, IP cameras, industrial controllers, and similar hardware often ship with vendor firmware that is rarely updated, leaving the original bug intact.

What Dirty COW Actually Allows

Dirty COW does not grant root privileges directly. It supplies a write primitive that can alter files such as /etc/passwd or overwrite code in memory-mapped regions. Attackers must then chain this primitive with additional steps, such as adding a root user entry or modifying a SUID binary, to achieve privilege escalation.

Public proof-of-concept code repeatedly triggers the race by writing through /proc/self/mem while calling madvise(..., MADV_DONTNEED). Correct timing causes the kernel to drop the original copy-on-write page, allowing the attacker’s data to persist in the shared mapping.

Why Ready-Made Exploits Often Fail

Many public Dirty COW exploits assume a full GNU userland with /bin/sh and conventional login utilities. On embedded systems that use BusyBox, these assumptions break. The single BusyBox binary may lack the expected applet, the required symbolic link may be absent, or the arguments passed to execve may not match the applet’s expectations.

Another common target is vDSO, a small kernel-provided library mapped into every process address space. Because vDSO exists only in memory and not as a file on disk, overwriting its functions requires precise knowledge of the architecture, the exported symbols, and the exact function chosen by the exploit. Payloads must also be written in the correct instruction set and respect the target ABI.

Practical Checks Before Exploitation

  • Kernel version, build date, and presence of the Dirty COW patch
  • Processor architecture, endianness, and enabled mitigations
  • Available BusyBox applets and presence of login or su mechanisms
  • Existence and contents of SUID binaries
  • Presence and exported symbols of vDSO in process memory maps
  • Compatibility of the chosen payload with the system’s libraries and shell environment

Exploitation attempts should be performed only on isolated test systems with rollback capability, as race-condition bugs can corrupt data or crash the target.

The article concludes by pointing readers to the free “White Hacker” course on the CyberED platform, where the practical lab “Strange And Dirty” requires participants to adapt a Dirty COW exploit to a minimal BusyBox environment and complete the privilege-escalation chain.

Related articles

HabrVulnerabilities & Exploits

Critical MikroTik RouterOS Vulnerabilities Enable SSH Authentication Bypass and Privilege Escalation

Polish CERT disclosed three vulnerabilities in MikroTik routers, two of which have been actively exploited since at least September 2. The flaws, rated 9.2 on CVSS, affect devices with internet-facing SSH access and were discovered using OpenAI models GPT 5.5 Cyber and GPT 5.6 Sol followed by manual verification. CVE-2026-67276 allows authentication bypass when the attacker knows the username and public key module, while CVE-2026-86060 permits privilege escalation via usernames containing invalid characters. Their combination enables full device compromise. A third issue, CVE-2026-67277 rated 8.8, resides in the speed-test service and can cause denial of service. Patches are available in RouterOS versions 7.25beta3, 7.24.2, 7.23.4 and 6.49.21, and MikroTik added detection for prior compromise. Attacks began concurrently with patch release and leave distinctive log entries.

HabrVulnerabilities & Exploits

Yookassa Webhook Flaw Allowed Forging Payment Confirmations via Single Curl Request

A technical audit of a car rental service uncovered a critical flaw in the Yookassa webhook handler where payment.succeeded events were trusted without verification. The endpoint accepted the event type and gateway_payment_id directly from the client-supplied payload, enabling attackers to mark pending bookings as paid using a simple unauthenticated POST request. The vulnerability existed because the integration did not use Yookassa's optional Webhook-Signature mechanism and avoided IP allowlisting due to proxy infrastructure concerns. Developers addressed the issue by implementing a reverse API call to fetch authoritative payment status from Yookassa before updating records, ensuring fail-closed behavior on errors. New tests cover forgery attempts, amount mismatches, and idempotency, while several additional hardening measures were deliberately deferred to keep the patch minimal and reviewable. The original unit tests had masked the problem by simulating trusted input rather than validating source authenticity.

SecuritylabVulnerabilities & Exploits

Password Deleted from Git but Still Present: Major CI/CD Security Mistakes

Developers often leave secrets in configuration files, .env examples, or test scripts that end up in Git history. Removing a file in a new commit does not erase previous versions, and .gitignore offers no protection for already tracked content. Pre-commit hooks with tools like Gitleaks can scan staged changes before they reach the repository. Docker images can retain secrets in layers even after removal commands, requiring BuildKit secret mounts instead. Terraform plans and state files may still expose sensitive values marked only as sensitive. Kubernetes workloads need both non-root containers with dropped capabilities and narrowly scoped RBAC roles. Multiple scanning stages from pre-commit through post-deployment help catch issues before they reach production.

Security NEXTVulnerabilities & Exploits

Critical SSRF Vulnerability in AWS SSM Agent Allows IAM Credential Theft via Port Forwarding Bypass

Amazon Web Services has disclosed a high-severity server-side request forgery vulnerability in the AWS Systems Manager Agent. The flaw, tracked as CVE-2026-89049, affects the port forwarding feature used by Session Manager and stems from insufficient validation that permits bypass of deny-list restrictions on link-local addresses. Successful exploitation requires port-forwarding permissions but can lead to unauthorized access to instance metadata and temporary IAM role credentials. The company rated the issue as Important with CVSSv4.0 base score 8.5 and CVSSv3.1 score 9.9. The vulnerability was addressed in version 3.3.4851.0 released on 13 July 2026, prior to the public advisory issued on 10 September 2026.