CVE-2017-1000405
Description
A flaw was found in the patches used to fix the 'dirtycow' vulnerability (CVE-2016-5195). An attacker, able to run local code, can exploit a race condition in transparent huge pages to modify usually read-only huge pages.
Statement
From the initial flaw description released, this issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5, 6, 7 and Red Hat Enterprise MRG 2. They do not contain the upstream commit (8310d48b125d19fcd9521d83b8293e63eb1646aa) which allows the race condition.
This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 7 for ARM and Red Hat Enterprise Linux for Power LE.
Future Linux kernel updates for the respective releases may address this issue.
For further information please refer to the vulnerability article in the Customer Portal: https://access.redhat.com/security/vulnerabilities/3253921
Mitigation
Disabling the use of zero page:
It is possible to prevent the zero page from being mapped as a huge page, by modifying a configuration tunable in the /sys directory as shown below. This prevents the flaw from being exercised in this method.
# echo 0 > /sys/kernel/mm/transparent_hugepage/use_zero_page
Disabling huge pages:
It is possible to mitigate this flaw by disabling hugepages on a system. Some user applications may require hugepages to be performant, and may suffer a performance penalty when running without hugepages.
Red Hat has existing solutions created instructing how to disable transparent
How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7
https://access.redhat.com/solutions/1320153
If your application may require transparent huge pages, please consult your software vendor to confirm.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 6.1 | 7 | N/A |
| Attack Vector | Local | Local | N/A |
| Attack Complexity | Low | High | N/A |
| Privileges Required | Low | Low | N/A |
| User Interaction | None | None | N/A |
| Scope | Unchanged | Unchanged | N/A |
| Confidentiality | None | High | N/A |
| Integrity Impact | High | High | N/A |
| Availability Impact | Low | High | N/A |
Vector
Red Hat: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
NVD: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Understanding the Weakness (CWE)
Availability
Technical Impact: DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory); DoS: Resource Consumption (Other)
When a race condition makes it possible to bypass a resource cleanup routine or trigger multiple initialization routines, it may lead to resource exhaustion.
Availability
Technical Impact: DoS: Crash, Exit, or Restart; DoS: Instability
When a race condition allows multiple control flows to access a resource simultaneously, it might lead the product(s) into unexpected states, possibly resulting in a crash.
Confidentiality,Integrity
Technical Impact: Read Files or Directories; Read Application Data
When a race condition is combined with predictable resource names and loose permissions, it may be possible for an attacker to overwrite or access confidential data (CWE-59).
Access Control
Technical Impact: Execute Unauthorized Code or Commands; Gain Privileges or Assume Identity; Bypass Protection Mechanism
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
Acknowledgements
Red Hat would like to thank Daniel Shapiro and Eylon Ben Yaakov for reporting this issue.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.