Cloudanix VulnDB

CVE-2017-1000405

High · 7.0

CVSS

7.0

EPSS

2.8%

Published

Nov 30, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in older Linux kernels lets a logged-in user change parts of memory that should stay read-only, which could let them gain more control over the system.

Exploit Available
Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
High
Impact
Privilege Gain
Component
OS kernel
Class
Race Condition
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

The flaw allows a local process to cause a PMD to become dirty via touch_pmd() reached through get_user_pages() without a copy-on-write cycle, enabling writes to read-only huge pages such as the zero page and sealed shmem files.

Why it matters to the business

Attackers on affected Linux systems can corrupt memory regions that should be read-only, potentially leading to privilege escalation or integrity violations on servers and endpoints running vulnerable kernels.

How an attack unfolds

A local attacker maps a read-only huge page, triggers get_user_pages() to invoke touch_pmd(), forces the PMD dirty state, and then performs writes that bypass intended protections on the zero huge page or sealed shmem.

How to fix it

Upgrade the Linux kernel to a version containing commit 0e2c4c21a56b8f820bab218566b02ea728909f45 or later; apply vendor-supplied kernel updates for distributions based on versions 2.6.38 through 4.14.

How to confirm the fix worked

Verify the running kernel version is newer than the affected range or contains the referenced commit; test that read-only huge page mappings cannot be written after the update.

Typical attack path

  1. Obtain local user access on a vulnerable Linux system
  2. Map a read-only huge page or sealed shmem file using THP
  3. Trigger get_user_pages() to reach touch_pmd()
  4. Exploit the dirty PMD state to write to the read-only page
  5. Achieve memory corruption or code execution

How to detect it

Review system logs for unusual page fault patterns or memory mapping activity by unprivileged processes; examine kernel audit records for get_user_pages calls on huge pages.

What your security team should do

  • Prioritize kernel updates on all systems still running versions 2.6.38-4.14
  • Restrict untrusted local accounts where possible until patches are applied
  • Monitor for new public exploits targeting this race condition

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 4.14.2-1
Debian:12 linux 0 4.14.2-1
Debian:13 linux 0 4.14.2-1
Red Hat:enterprise_linux:7::server kernel 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-abi-whitelists 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-alt 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-bootwrapper 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-debug 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-debug-debuginfo 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-debug-devel 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-debuginfo 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-debuginfo-common-aarch64 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-debuginfo-common-ppc64le 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-devel 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-doc 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-headers 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-tools 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-tools-debuginfo 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-tools-libs 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server kernel-tools-libs-devel 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server perf 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server perf-debuginfo 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server python-perf 0 0:4.11.0-44.4.1.el7a
Red Hat:enterprise_linux:7::server python-perf-debuginfo 0 0:4.11.0-44.4.1.el7a
SUSE:Linux Enterprise Desktop 12 SP2 kernel-default 0 4.4.90-92.50.1
SUSE:Linux Enterprise Desktop 12 SP2 kernel-source 0 4.4.90-92.50.1
SUSE:Linux Enterprise Desktop 12 SP2 kernel-syms 0 4.4.90-92.50.1
SUSE:Linux Enterprise Desktop 12 SP3 kernel-default 0 4.4.92-6.30.1
SUSE:Linux Enterprise Desktop 12 SP3 kernel-source 0 4.4.92-6.30.1
SUSE:Linux Enterprise Desktop 12 SP3 kernel-syms 0 4.4.92-6.30.1
SUSE:Linux Enterprise High Availability Extension 12 SP2 kernel-default 0 4.4.90-92.50.1
SUSE:Linux Enterprise High Availability Extension 12 SP3 kernel-default 0 4.4.92-6.30.1
SUSE:Linux Enterprise Live Patching 12 kgraft-patch-SLE12-SP2_Update_10 0 6-2.1
SUSE:Linux Enterprise Live Patching 12 kgraft-patch-SLE12-SP2_Update_11 0 5-2.1
SUSE:Linux Enterprise Live Patching 12 kgraft-patch-SLE12-SP2_Update_12 0 5-2.1
SUSE:Linux Enterprise Live Patching 12 kgraft-patch-SLE12-SP2_Update_13 0 4-2.1
SUSE:Linux Enterprise Live Patching 12 kgraft-patch-SLE12-SP2_Update_14 0 2-2.1
SUSE:Linux Enterprise Live Patching 12 kgraft-patch-SLE12-SP2_Update_15 0 1-4.1
SUSE:Linux Enterprise Live Patching 12 kgraft-patch-SLE12-SP2_Update_7 0 7-2.1
SUSE:Linux Enterprise Live Patching 12 kgraft-patch-SLE12-SP2_Update_8 0 7-2.1
SUSE:Linux Enterprise Live Patching 12 kgraft-patch-SLE12-SP2_Update_9 0 6-2.1
SUSE:Linux Enterprise Live Patching 12 SP3 kgraft-patch-SLE12-SP3_Update_1 0 4-2.1
SUSE:Linux Enterprise Live Patching 12 SP3 kgraft-patch-SLE12-SP3_Update_2 0 3-2.1
SUSE:Linux Enterprise Live Patching 12 SP3 kgraft-patch-SLE12-SP3_Update_3 0 3-2.1
SUSE:Linux Enterprise Live Patching 12 SP3 kgraft-patch-SLE12-SP3_Update_4 0 2-2.1
SUSE:Linux Enterprise Live Patching 12 SP3 kgraft-patch-SLE12-SP3_Update_5 0 1-6.1
SUSE:Linux Enterprise Live Patching 12 SP4 kgraft-patch-SLE12-SP4_Update_10 0 8-2.2
SUSE:Linux Enterprise Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_0 0 8-21.2
SUSE:Linux Enterprise Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_1 0 8-2.2
SUSE:Linux Enterprise Live Patching 15 kernel-livepatch-SLE15_Update_16 0 8-2.2
SUSE:Linux Enterprise Live Patching 15 SP1 kernel-livepatch-SLE15-SP1_Update_7 0 8-2.2
SUSE:Linux Enterprise Module for Public Cloud 12 kernel-ec2 0 3.12.74-60.64.66.1
SUSE:Linux Enterprise Module for Public Cloud 12 kernel-ec2 0 3.12.61-52.106.1
SUSE:Linux Enterprise Real Time 12 SP2 kernel-rt 0 4.4.104-24.1
SUSE:Linux Enterprise Real Time 12 SP2 kernel-rt_debug 0 4.4.104-24.1
SUSE:Linux Enterprise Real Time 12 SP2 kernel-source-rt 0 4.4.104-24.1
SUSE:Linux Enterprise Real Time 12 SP2 kernel-syms-rt 0 4.4.104-24.1
SUSE:Linux Enterprise Server 12 SP1-LTSS kernel-default 0 3.12.74-60.64.66.1
SUSE:Linux Enterprise Server 12 SP1-LTSS kernel-source 0 3.12.74-60.64.66.1
SUSE:Linux Enterprise Server 12 SP1-LTSS kernel-syms 0 3.12.74-60.64.66.1
SUSE:Linux Enterprise Server 12 SP1-LTSS kernel-xen 0 3.12.74-60.64.66.1
SUSE:Linux Enterprise Server 12 SP1-LTSS kgraft-patch-SLE12-SP1_Update_23 0 1-2.1
SUSE:Linux Enterprise Server 12 SP2 kernel-default 0 4.4.90-92.50.1
SUSE:Linux Enterprise Server 12 SP2 kernel-source 0 4.4.90-92.50.1
SUSE:Linux Enterprise Server 12 SP2 kernel-syms 0 4.4.90-92.50.1
SUSE:Linux Enterprise Server 12 SP3 kernel-default 0 4.4.92-6.30.1
SUSE:Linux Enterprise Server 12 SP3 kernel-source 0 4.4.92-6.30.1
SUSE:Linux Enterprise Server 12 SP3 kernel-syms 0 4.4.92-6.30.1
SUSE:Linux Enterprise Server 12-LTSS kernel-default 0 3.12.61-52.106.1
SUSE:Linux Enterprise Server 12-LTSS kernel-source 0 3.12.61-52.106.1
SUSE:Linux Enterprise Server 12-LTSS kernel-syms 0 3.12.61-52.106.1
SUSE:Linux Enterprise Server 12-LTSS kernel-xen 0 3.12.61-52.106.1
SUSE:Linux Enterprise Server 12-LTSS kgraft-patch-SLE12_Update_29 0 1-5.1
SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 kernel-default 0 4.4.90-92.50.1
SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 kernel-source 0 4.4.90-92.50.1
SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 kernel-syms 0 4.4.90-92.50.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 kernel-default 0 3.12.74-60.64.66.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 kernel-source 0 3.12.74-60.64.66.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 kernel-syms 0 3.12.74-60.64.66.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 kernel-xen 0 3.12.74-60.64.66.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 kgraft-patch-SLE12-SP1_Update_23 0 1-2.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP2 kernel-default 0 4.4.90-92.50.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP2 kernel-source 0 4.4.90-92.50.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP2 kernel-syms 0 4.4.90-92.50.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 kernel-default 0 4.4.92-6.30.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 kernel-source 0 4.4.92-6.30.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 kernel-syms 0 4.4.92-6.30.1
SUSE:Linux Enterprise Software Development Kit 12 SP2 kernel-docs 0 4.4.90-92.50.3
SUSE:Linux Enterprise Software Development Kit 12 SP2 kernel-obs-build 0 4.4.90-92.50.1
SUSE:Linux Enterprise Software Development Kit 12 SP3 kernel-docs 0 4.4.92-6.30.2
SUSE:Linux Enterprise Software Development Kit 12 SP3 kernel-obs-build 0 4.4.92-6.30.1
SUSE:Linux Enterprise Workstation Extension 12 SP2 kernel-default 0 4.4.90-92.50.1
SUSE:Linux Enterprise Workstation Extension 12 SP3 kernel-default 0 4.4.92-6.30.1
SUSE:OpenStack Cloud 6 kernel-default 0 3.12.74-60.64.66.1
SUSE:OpenStack Cloud 6 kernel-source 0 3.12.74-60.64.66.1
SUSE:OpenStack Cloud 6 kernel-syms 0 3.12.74-60.64.66.1
SUSE:OpenStack Cloud 6 kernel-xen 0 3.12.74-60.64.66.1
SUSE:OpenStack Cloud 6 kgraft-patch-SLE12-SP1_Update_23 0 1-2.1
Ubuntu:14.04:LTS linux 0 3.13.0-137.186
Ubuntu:14.04:LTS linux-aws 0 4.4.0-1005.5
Ubuntu:14.04:LTS linux-azure 0 4.15.0-1023.24~14.04.1
Ubuntu:14.04:LTS linux-lts-xenial 0 4.4.0-103.126~14.04.1
Ubuntu:16.04:LTS linux 0 4.4.0-103.126
Ubuntu:16.04:LTS linux-aws 0 4.4.0-1043.52
Ubuntu:16.04:LTS linux-aws-hwe 0 4.15.0-1030.31~16.04.1
Ubuntu:16.04:LTS linux-azure 0 4.11.0-1016.16
Ubuntu:16.04:LTS linux-gcp 0 4.13.0-1002.5
Ubuntu:16.04:LTS linux-hwe 0 4.10.0-42.46~16.04.1
Ubuntu:16.04:LTS linux-hwe 0 4.13.0-32.35~16.04.1
Ubuntu:16.04:LTS linux-kvm 0 4.4.0-1012.17
Ubuntu:16.04:LTS linux-oem 0 4.13.0-1010.11
Ubuntu:16.04:LTS linux-oracle 0 4.15.0-1007.9~16.04.1
Ubuntu:16.04:LTS linux-raspi2 0 4.4.0-1079.87
Ubuntu:16.04:LTS linux-snapdragon 0 4.4.0-1081.86
Ubuntu:18.04:LTS linux 0 4.13.0-25.29
Ubuntu:18.04:LTS linux-aws 0 4.15.0-1001.1
Ubuntu:18.04:LTS linux-aws-5.4 0 5.4.0-1018.18~18.04.1
Ubuntu:18.04:LTS linux-azure 0 4.15.0-1002.2
Ubuntu:18.04:LTS linux-azure-4.15 0 4.15.0-1082.92
Ubuntu:18.04:LTS linux-azure-5.4 0 5.4.0-1020.20~18.04.1
Ubuntu:18.04:LTS linux-gcp 0 4.15.0-1001.1
Ubuntu:18.04:LTS linux-gcp-4.15 0 4.15.0-1071.81
Ubuntu:18.04:LTS linux-gcp-5.4 0 5.4.0-1019.19~18.04.2
Ubuntu:18.04:LTS linux-hwe 0 No fix
Ubuntu:18.04:LTS linux-hwe-5.4 0 5.4.0-37.41~18.04.1
Ubuntu:18.04:LTS linux-hwe-edge 0 No fix
Ubuntu:18.04:LTS linux-ibm-5.4 0 5.4.0-1010.11~18.04.2
Ubuntu:18.04:LTS linux-kvm 0 4.15.0-1002.2
Ubuntu:18.04:LTS linux-oracle 0 4.15.0-1007.9
Ubuntu:18.04:LTS linux-oracle-5.4 0 5.4.0-1019.19~18.04.1
Ubuntu:18.04:LTS linux-raspi-5.4 0 5.4.0-1013.13~18.04.1
Ubuntu:18.04:LTS linux-raspi2 0 4.13.0-1008.8
Ubuntu:20.04:LTS linux 0 5.4.0-9.12
Ubuntu:20.04:LTS linux-aws 0 5.4.0-1005.5
Ubuntu:20.04:LTS linux-aws-5.15 0 5.15.0-1014.18~20.04.1
Ubuntu:20.04:LTS linux-azure 0 5.4.0-1006.6
Ubuntu:20.04:LTS linux-azure-5.15 0 5.15.0-1007.8~20.04.1
Ubuntu:20.04:LTS linux-azure-fde 0 No fix
Ubuntu:20.04:LTS linux-azure-fde-5.15 0 5.15.0-1019.24~20.04.1.1
Ubuntu:20.04:LTS linux-bluefield 0 5.4.0-1007.10
Ubuntu:20.04:LTS linux-gcp 0 5.4.0-1005.5
Ubuntu:20.04:LTS linux-gcp-5.15 0 5.15.0-1006.9~20.04.1
Ubuntu:20.04:LTS linux-gke 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 5.4.0-1008.9
Ubuntu:20.04:LTS linux-gkeop-5.15 0 5.15.0-1003.5~20.04.2
Ubuntu:20.04:LTS linux-hwe-5.15 0 5.15.0-33.34~20.04.1
Ubuntu:20.04:LTS linux-ibm 0 5.4.0-1003.4
Ubuntu:20.04:LTS linux-ibm-5.15 0 5.15.0-1033.36~20.04.1
Ubuntu:20.04:LTS linux-intel-iotg-5.15 0 5.15.0-1003.5~20.04.1
Ubuntu:20.04:LTS linux-iot 0 5.4.0-1001.3
Ubuntu:20.04:LTS linux-kvm 0 5.4.0-1004.4
Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15 0 5.15.0-33.34~20.04.1
Ubuntu:20.04:LTS linux-oracle 0 5.4.0-1005.5
Ubuntu:20.04:LTS linux-oracle-5.15 0 5.15.0-1007.9~20.04.1
Ubuntu:20.04:LTS linux-raspi 0 5.4.0-1007.7
Ubuntu:20.04:LTS linux-raspi2 0 No fix
Ubuntu:20.04:LTS linux-riscv 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.15 0 5.15.0-1015.17~20.04.1
Ubuntu:20.04:LTS linux-xilinx-zynqmp 0 5.4.0-1020.24
Ubuntu:22.04:LTS linux 0 5.13.0-19.19
Ubuntu:22.04:LTS linux-aws 0 5.13.0-1005.6
Ubuntu:22.04:LTS linux-aws-6.8 0 6.8.0-1009.9~22.04.2
Ubuntu:22.04:LTS linux-azure 0 5.13.0-1006.7
Ubuntu:22.04:LTS linux-azure-6.8 0 6.8.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-azure-fde 0 5.15.0-1019.24.1
Ubuntu:22.04:LTS linux-gcp 0 5.13.0-1005.6
Ubuntu:22.04:LTS linux-gcp-6.8 0 6.8.0-1010.11~22.04.1
Ubuntu:22.04:LTS linux-gke 0 5.15.0-1002.2
Ubuntu:22.04:LTS linux-gkeop 0 5.15.0-1001.2
Ubuntu:22.04:LTS linux-hwe-6.8 0 6.8.0-38.38~22.04.1
Ubuntu:22.04:LTS linux-ibm 0 5.15.0-1002.2
Ubuntu:22.04:LTS linux-intel-iot-realtime 0 No fix
Ubuntu:22.04:LTS linux-intel-iot-realtime 0 5.15.0-1021.26
Ubuntu:22.04:LTS linux-intel-iotg 0 5.15.0-1004.6
Ubuntu:22.04:LTS linux-kvm 0 5.13.0-1004.4
Ubuntu:22.04:LTS linux-lowlatency 0 5.15.0-22.22
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.8 0 6.8.0-38.38.1~22.04.2
Ubuntu:22.04:LTS linux-nvidia 0 5.15.0-1005.5
Ubuntu:22.04:LTS linux-nvidia-6.5 0 6.5.0-1004.4
Ubuntu:22.04:LTS linux-nvidia-6.8 0 6.8.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-oracle 0 5.13.0-1008.10
Ubuntu:22.04:LTS linux-oracle-6.8 0 6.8.0-1006.6~22.04.3
Ubuntu:22.04:LTS linux-raspi 0 5.13.0-1008.9
Ubuntu:22.04:LTS linux-realtime 0 No fix
Ubuntu:22.04:LTS linux-riscv 0 No fix
Ubuntu:22.04:LTS linux-riscv-6.8 0 6.8.0-38.38.1~22.04.1
Ubuntu:22.04:LTS linux-xilinx-zynqmp 0 5.15.0-1022.26
Ubuntu:22.04:LTS:for:NVIDIA:BlueField linux-bluefield 0 5.15.0-1011.13
Ubuntu:24.04:LTS linux 0 6.5.0-9.9
Ubuntu:24.04:LTS linux-aws 0 6.5.0-1008.8
Ubuntu:24.04:LTS linux-azure 0 6.5.0-1007.7
Ubuntu:24.04:LTS linux-gcp 0 6.5.0-1007.7
Ubuntu:24.04:LTS linux-gke 0 6.8.0-1003.5
Ubuntu:24.04:LTS linux-gkeop 0 6.8.0-1001.3
Ubuntu:24.04:LTS linux-ibm 0 6.5.0-1009.9
Ubuntu:24.04:LTS linux-lowlatency 0 6.5.0-9.9.1
Ubuntu:24.04:LTS linux-nvidia 0 6.8.0-1007.7
Ubuntu:24.04:LTS linux-nvidia-lowlatency 0 6.8.0-1009.9.1
Ubuntu:24.04:LTS linux-oem-6.11 0 6.11.0-1007.7
Ubuntu:24.04:LTS linux-oem-6.8 0 6.8.0-1003.3

Related vulnerabilities