CVE-2017-1000405

kernel: pmd can become dirty without going through a COW cycle

Published Nov 30, 2017 CVSS 3.1 · 7.0 High EPSS 2.8% KEV · Not listed
Description
The Linux Kernel versions 2.6.38 through 4.14 have a problematic use of pmd_mkdirty() in the touch_pmd() function inside the THP implementation. touch_pmd() can be reached by get_user_pages(). In such case, the pmd will become dirty. This scenario breaks the new can_follow_write_pmd()'s logic - pmd can become dirty without going through a COW cycle. This bug is not as severe as the original "Dirty cow" because an ext4 file (or any other regular file) cannot be mapped using THP. Nevertheless, it does allow us to overwrite read-only huge pages. For example, the zero huge page and sealed shmem files can be overwritten (since their mapping can be populated using THP). Note that after the first write page-fault to the zero page, it will be replaced with a new fresh (and zeroed) thp.

Analysis

No analysis available yet

Remediation

No remediation available yet

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2017-1545 The Linux Kernel versions 2.6.38 through 4.14 have a problematic use of pmd_mkdirty() in the touch_pmd() function inside the THP implementation. touch_pmd() can be reached by get_user_pages(). In such case, the pmd will become dirty. This scenario breaks the new can_follow_write_pmd()'s logic - pmd can become dirty without going through a COW cycle. This bug is not as severe as the original "Dirty cow" because an ext4 file (or any other regular file) cannot be mapped using THP. Nevertheless, it does allow us to overwrite read-only huge pages. For example, the zero huge page and sealed shmem files can be overwritten (since their mapping can be populated using THP). Note that after the first write page-fault to the zero page, it will be replaced with a new fresh (and zeroed) thp.
Ubuntu USN Ubuntu USN USN-3507-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-3507-2 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-3508-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-3508-2 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-3509-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-3509-2 Linux kernel (Xenial HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-3510-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-3510-2 Linux kernel (Trusty HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-3511-1 Linux kernel (Azure) vulnerabilities
History
Type Values Removed Values Added
Metrics epss

{'score': 0.03008}

epss

{'score': 0.03089}

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Aug 5, 2024, 10:00 PM
Reserved
Nov 29, 2017, 12:00 AM
Status
Modified
Published
Nov 30, 2017, 10:29 PM
Modified
Jun 17, 2026, 12:59 AM
Severity
Important
Public date
Nov 30, 2017, 12:00 AM