Common Vulnerabilities and Exposures (CVE)

Public dictionary of known cybersecurity flaws, providing unique identifiers (CVE IDs), descriptions, and references for security vulnerabilities in software and hardware.

CVE-2017-1000112

Assigned by [email protected]

Linux kernel: Exploitable memory corruption due to UFO to non-UFO path switch. When building a UFO packet with MSG_MORE __ip_append_data() calls ip_ufo_append_data() to append. However in between two send() calls, the append path can be switched from UFO to non-UFO one, which leads to a memory corruption. In case UFO packet lengths exceeds MTU, copy = maxfraglen - skb->len becomes negative on the non-UFO path and the branch to allocate new skb is taken. This triggers fragmentation and computation of fraggap = skb_prev->len - maxfraglen. Fraggap can exceed MTU, causing copy = datalen - transhdrlen - fraggap to become negative. Subsequently skb_copy_and_csum_bits() writes out-of-bounds. A similar issue is present in IPv6 code. The bug was introduced in e89e9cf539a2 ("[IPv4/IPv6]: UFO Scatter-gather approach") on Oct 18 2005.


Weaknesses (CWE)

CWE-362 — Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Chain: Signal handler contains too much functionality (CWE-828), introducing a race condition (CWE-362) that leads to a double free (CWE-415).Chain: Signal handler contains too much functionality (CWE-828), introducing a race condition (CWE-362) that leads to a double free (CWE-415).

CVSS

7

Base Score: 7/10 HIGH

Exploitability: 1/10

Impact: 5.9/10

Access Vector

  • Availability: HIGH
  • Confidentiality: HIGH
  • Integrity: HIGH

Impact

  • Authentication: NONE
  • Complexity: MEDIUM
  • Vector: LOCAL

Attack Patterns (CAPEC)

CAPEC-26 — Leveraging Race Conditions

The adversary targets a race condition occurring when multiple processes access and manipulate the same resource concurrently, and the outcome of the execution depends on the particular order in which the access takes place. The adversary can leverage a race condition by "running the race", modifying the resource and modifying the normal execution flow. For instance, a race condition can occur while accessing a file: the adversary can trick the system by replacing the original file with their version and cause the system to read the malicious file.

Typical severity: High

Prerequisites: A resource is accessed/modified concurrently by multiple processes such that a race condition exists. The adversary has the ability to modify the resource.

Solutions: Use safe libraries to access resources such as files. Be aware that improper use of access function calls such as chown(), tempfile(), chmod(), etc. can cause a race condition. Use synchronization to control the flow of execution. Use static analysis tools to find race conditions. Pay attention to concurrency problems related to the access of resources.

CAPEC-29 — Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions

This attack targets a race condition occurring between the time of check (state) for a resource and the time of use of a resource. A typical example is file access. The adversary can leverage a file access race condition by "running the race", meaning that they would modify the resource between the first time the target program accesses the file and the time the target program uses the file. During that period of time, the adversary could replace or modify the file, causing the application to behave unexpectedly.

Typical severity: High

Prerequisites: A resource is access/modified concurrently by multiple processes. The adversary is able to modify resource. A race condition exists while accessing a resource.

Solutions: Use safe libraries to access resources such as files. Be aware that improper use of access function calls such as chown(), tempfile(), chmod(), etc. can cause a race condition. Use synchronization to control the flow of execution. Use static analysis tools to find race conditions. Pay attention to concurrency problems related to the access of resources.

References

http://seclists.org/oss-sec/2017/q3/277
http://www.debian.org/security/2017/dsa-3981
http://www.securityfocus.com/bid/100262
http://www.securitytracker.com/id/1039162
https://access.redhat.com/errata/RHSA-2017:2918
https://access.redhat.com/errata/RHSA-2017:2930
https://access.redhat.com/errata/RHSA-2017:2931
https://access.redhat.com/errata/RHSA-2017:3200
https://access.redhat.com/errata/RHSA-2019:1931
https://access.redhat.com/errata/RHSA-2019:1932
https://access.redhat.com/errata/RHSA-2019:4159
https://github.com/xairy/kernel-exploits/tree/master/CVE-2017-1000112
https://www.exploit-db.com/exploits/45147/
http://seclists.org/oss-sec/2017/q3/277
http://www.debian.org/security/2017/dsa-3981
http://www.securityfocus.com/bid/100262
http://www.securitytracker.com/id/1039162
https://access.redhat.com/errata/RHSA-2017:2918
https://access.redhat.com/errata/RHSA-2017:2930
https://access.redhat.com/errata/RHSA-2017:2931
https://access.redhat.com/errata/RHSA-2017:3200
https://access.redhat.com/errata/RHSA-2019:1931
https://access.redhat.com/errata/RHSA-2019:1932
https://access.redhat.com/errata/RHSA-2019:4159
https://github.com/xairy/kernel-exploits/tree/master/CVE-2017-1000112
https://www.exploit-db.com/exploits/45147/