Skip to content
OpenAdvisories
Unscored Public exploit CVE-2017-1000405 EUVD-2017-1545GHSA-c6vh-7mwq-c4gc

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 implementa…

Published Nov 30, 2017 · Updated Aug 5, 2024 · Assigned by mitre

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 4.14.2-1 —
Debian 13 linux 4.14.2-1 —
Debian 12 linux 4.14.2-1 —
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS linux-raspi-realtime No fix yet —
Ubuntu 22.04 LTS linux-riscv +2 No fix yet —
Ubuntu 20.04 LTS linux-gke +3 No fix yet —
Ubuntu 18.04 LTS linux-hwe +1 No fix yet —
Ubuntu 16.04 LTS linux 4.4.0-103.126 USN-3509-1
Ubuntu 16.04 LTS linux-aws 4.4.0-1043.52 USN-3509-1
Ubuntu 16.04 LTS linux-azure 4.11.0-1016.16 USN-3511-1
Ubuntu 16.04 LTS linux-gcp 4.13.0-1002.5 USN-3507-2
Ubuntu 16.04 LTS linux-hwe 4.13.0-32.35~16.04.1 USN-3508-2
Ubuntu 16.04 LTS linux-kvm 4.4.0-1012.17 USN-3509-1
Ubuntu 16.04 LTS linux-oem 4.13.0-1010.11 —
Ubuntu 16.04 LTS linux-raspi2 4.4.0-1079.87 USN-3509-1
Ubuntu 16.04 LTS linux-snapdragon 4.4.0-1081.86 USN-3509-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 14.04 LTS linux 3.13.0-137.186 USN-3510-1
Ubuntu 14.04 LTS linux-aws 4.4.0-1005.5 USN-3509-2
Ubuntu 14.04 LTS linux-lts-xenial 4.4.0-103.126~14.04.1 USN-3509-2
Ubuntu Pro FIPS-updates 16.04 LTS linux-fips 4.4.0-1005.5 —
ReleasePackageFixed inAdvisory
RHEL 7 perf +15 4.11.0-44.4.1.el7a RHSA-2018:0180
ReleasePackageFixed inAdvisory
SLES 12 SP3 kernel-docs 4.4.92-6.30.2 SUSE-SU-2017:3225-1
SLES 12 SP3 kernel-syms +3 4.4.92-6.30.1 SUSE-SU-2017:3225-1
SLES 12 SP2 kernel-docs 4.4.90-92.50.3 SUSE-SU-2017:3226-1
SLES 12 SP2 kernel-syms +3 4.4.90-92.50.1 SUSE-SU-2017:3226-1
SLES 12 SP1 kernel-xen +3 3.12.74-60.64.66.1 SUSE-SU-2017:3210-1
SLES 12 SP1 kgraft-patch-SLE12-SP1_Update_23 1-2.1 SUSE-SU-2017:3210-1
SLES 12 kernel-ec2 +4 3.12.61-52.106.1 SUSE-SU-2017:3249-1, SUSE-SU-2017:3210-1
SLES 12 kgraft-patch-SLE12_Update_29 1-5.1 SUSE-SU-2017:3249-1
Show 11 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 12 SP3 kernel-syms +2 4.4.92-6.30.1 SUSE-SU-2017:3225-1
SLES for SAP 12 SP2 kernel-syms +2 4.4.90-92.50.1 SUSE-SU-2017:3226-1
SLES for SAP 12 SP1 kernel-xen +3 3.12.74-60.64.66.1 SUSE-SU-2017:3210-1
SLES for SAP 12 SP1 kgraft-patch-SLE12-SP1_Update_23 1-2.1 SUSE-SU-2017:3210-1
SLE Real Time 12 SP2 kernel-rt +3 4.4.104-24.1 SUSE-SU-2018:0213-1
SLE Live Patching 15 SP1 kernel-livepatch-SLE15-SP1_Update_7 8-2.2 SUSE-SU-2020:3400-1
SLE Live Patching 15 kernel-livepatch-SLE15_Update_16 8-2.2 SUSE-SU-2020:3449-1
SLE Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_0 8-21.2 SUSE-SU-2020:3400-1
SLE Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_1 8-2.2 SUSE-SU-2020:3400-1
SLE Live Patching 12 SP4 kgraft-patch-SLE12-SP4_Update_10 8-2.2 SUSE-SU-2020:3449-1
SLE Live Patching 12 SP3 kgraft-patch-SLE12-SP3_Update_1 4-2.1 SUSE-SU-2017:3319-1
SLE Live Patching 12 SP3 kgraft-patch-SLE12-SP3_Update_2 +1 3-2.1 SUSE-SU-2017:3324-1, SUSE-SU-2017:3314-1
SLE Live Patching 12 SP3 kgraft-patch-SLE12-SP3_Update_4 2-2.1 SUSE-SU-2017:3317-1
SLE Live Patching 12 SP3 kgraft-patch-SLE12-SP3_Update_5 1-6.1 SUSE-SU-2017:3225-1
SLE Live Patching 12 kgraft-patch-SLE12-SP2_Update_11 +1 5-2.1 SUSE-SU-2017:3295-1, SUSE-SU-2017:3284-1
SLE Live Patching 12 kgraft-patch-SLE12-SP2_Update_13 4-2.1 SUSE-SU-2017:3297-1
SLE Live Patching 12 kgraft-patch-SLE12-SP2_Update_14 2-2.1 SUSE-SU-2017:3285-1
SLE Live Patching 12 kgraft-patch-SLE12-SP2_Update_15 1-4.1 SUSE-SU-2017:3226-1
SLE Live Patching 12 kgraft-patch-SLE12-SP2_Update_7 +1 7-2.1 SUSE-SU-2017:3310-1, SUSE-SU-2017:3286-1
SLE Live Patching 12 kgraft-patch-SLE12-SP2_Update_9 +1 6-2.1 SUSE-SU-2017:3300-1, SUSE-SU-2017:3296-1
SUSE OpenStack Cloud 6 kernel-xen +3 3.12.74-60.64.66.1 SUSE-SU-2017:3210-1
SUSE OpenStack Cloud 6 kgraft-patch-SLE12-SP1_Update_23 1-2.1 SUSE-SU-2017:3210-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 perf +8 4.9.81-44.57.amzn2 ALAS2-2018-956

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 7 kernel-uek +5 4.1.12-103.10.1.el7uek ELSA-2017-3651

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 29

References