Race Condition Affecting perf-debuginfo package, versions <0:4.9.81-35.56.amzn1


Severity

Recommended
high

Based on Amazon Linux security rating.

Threat Intelligence

Exploit Maturity
Mature
EPSS
0.18% (57th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-AMZN201803-PERFDEBUGINFO-1710347
  • published27 Sept 2021
  • disclosed30 Nov 2017

Introduced: 30 Nov 2017

CVE-2017-1000405  (opens in a new tab)
CWE-362  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2018.03 perf-debuginfo to version 0:4.9.81-35.56.amzn1 or higher.
This issue was patched in ALAS-2018-956.

NVD Description

Note: Versions mentioned in the description apply only to the upstream perf-debuginfo package and not the perf-debuginfo package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2018.03 relevant fixed versions and status.

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.

CVSS Scores

version 3.1