Linux Kernel PIE Stack Buffer Corruption
CVE-2017-1000253 is a high-severity improper restriction of operations within the bounds of a memory buffer vulnerability in centos, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. Affected centos versions: 6.0; 6.1; 6.2, and others listed below. The record does not name a fixed version, so check the vendor advisory. CISA added it to the Known Exploited Vulnerabilities catalogue on September 9, 2024, which means attacks have been observed in the wild, including in ransomware campaigns.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update linux_kernel to 3.2.70 or 3.4.109 or 3.10.77 or 3.12.43, whichever matches your release line, or a later version.
- CISA's required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Centos | centos | 6.0; 6.1; 6.2; 6.3; 6.4; 6.5; 6.6; 6.7; and 6 more ranges | Not stated |
| Red Hat | enterprise_linux | 6.0; 6.1; 6.2; 6.3; 6.4; 6.5; 6.6; 6.7; and 6 more ranges | Not stated |
| Linux | linux_kernel | 2.6.25 up to, but not including, 3.2.70; 3.3 up to, but not including, 3.4.109; 3.5 up to, but not including, 3.10.77; 3.11 up to, but not including, 3.12.43; 3.13 up to, but not including, 3.14.41; 3.15 up to, but not including, 3.16.35; 3.17 up to, but not including, 3.18.14; 3.19 up to, but not including, 3.19.7; and 1 more ranges | 3.2.70, 3.4.109, 3.10.77, 3.12.43, 3.14.41, 3.16.35 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | NVD |
| CVSS 3.1 | 7.8 | High | CISA (ADP) |
| CVSS 2.0 | 7.2 | High | NVD |
Official description
Linux distributions that have not patched their long-term kernels with https://git.kernel.org/linus/a87938b2e246b81b4fb713edb371a9fa3c5c3c86 (committed on April 14, 2015). This kernel vulnerability was fixed in April 2015 by commit a87938b2e246b81b4fb713edb371a9fa3c5c3c86 (backported to Linux 3.10.77 in May 2015), but it was not recognized as a security threat. With CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE enabled, and a normal top-down address allocation strategy, load_elf_binary() will attempt to map a PIE binary into an address range immediately below mm->mmap_base. Unfortunately, load_elf_ binary() does not take account of the need to allocate sufficient space for the entire binary which means that, while the first PT_LOAD segment is mapped below mm->mmap_base, the subsequent PT_LOAD segment(s) end up being mapped above mm->mmap_base into the are that is supposed to be the "gap" between the stack and the binary.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary.
How developers prevent this class of flaw
- Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega, and the Strsafe.h library from Microsoft. These libraries provide safer versions of overflow-prone string-handling functions.
- Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND discusses canary-based detection in detail.
Timeline
- CVE record published.
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: total).
- Deadline for US federal agencies to remediate, set by CISA.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- qualys.com/2017/09/26/cve-2017-1000253/cve-2017-1000253.txtThird Party Advisory
Third-party and government advisories
- securityfocus.com/bid/101010Third Party Advisory, VDB Entry
- securitytracker.com/id/1039434Third Party Advisory, VDB Entry
- access.redhat.com/errata/RHSA-2017:2793Third Party Advisory
- access.redhat.com/errata/RHSA-2017:2794Third Party Advisory
- access.redhat.com/errata/RHSA-2017:2795Third Party Advisory
- access.redhat.com/errata/RHSA-2017:2796Third Party Advisory
- access.redhat.com/errata/RHSA-2017:2797Third Party Advisory
- access.redhat.com/errata/RHSA-2017:2798Third Party Advisory
- access.redhat.com/errata/RHSA-2017:2799Third Party Advisory
- access.redhat.com/errata/RHSA-2017:2800Third Party Advisory
- access.redhat.com/errata/RHSA-2017:2801Third Party Advisory
- access.redhat.com/errata/RHSA-2017:2802Third Party Advisory
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-1000253US Government Resource
Recent Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerabilities
- 9.8 Critical severity
- 8.8 High severity
- 8.8 High severity
- 8.8 High severity
- 8.8 High severity
- 8.8 High severity
Spotted an error? Tell us.