Bug 1479307 (CVE-2017-1000112) - CVE-2017-1000112 kernel: Exploitable memory corruption due to UFO to non-UFO path switch
Summary: CVE-2017-1000112 kernel: Exploitable memory corruption due to UFO to non-UFO ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2017-1000112
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1725185 1480465 1481529 1481530 1481531 1481532 1481533 1481534 1481535 1481536 1481537 1640510
Blocks: 1479311
TreeView+ depends on / blocked
 
Reported: 2017-08-08 10:49 UTC by Andrej Nemec
Modified: 2019-09-29 14:18 UTC (History)
39 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
An exploitable memory corruption flaw was found in the Linux kernel. The append path can be erroneously switched from UFO to non-UFO in ip_ufo_append_data() when building an UFO packet with MSG_MORE option. If unprivileged user namespaces are available, this flaw can be exploited to gain root privileges.
Clone Of:
Environment:
Last Closed: 2019-06-08 03:20:10 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2918 normal SHIPPED_LIVE Important: kernel-rt security and bug fix update 2017-10-19 17:24:24 UTC
Red Hat Product Errata RHSA-2017:2930 normal SHIPPED_LIVE Important: kernel security and bug fix update 2017-10-19 18:47:35 UTC
Red Hat Product Errata RHSA-2017:2931 normal SHIPPED_LIVE Important: kernel-rt security and bug fix update 2017-10-19 18:48:35 UTC
Red Hat Product Errata RHSA-2017:3200 normal SHIPPED_LIVE Important: kernel security and bug fix update 2017-11-15 01:34:41 UTC
Red Hat Product Errata RHSA-2019:1931 None None None 2019-07-29 16:50:20 UTC
Red Hat Product Errata RHSA-2019:1932 None None None 2019-07-29 16:49:25 UTC

Description Andrej Nemec 2017-08-08 10:49:42 UTC
A memory corruption issue was found in the Linux kernel. 

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.

Introducing commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e89e9cf539a2

Comment 1 Andrej Nemec 2017-08-08 10:49:54 UTC
Acknowledgments:

Name: Andrey Konovalov

Comment 2 Adam Mariš 2017-08-11 08:08:16 UTC
Public via:

http://seclists.org/oss-sec/2017/q3/277

Comment 3 Adam Mariš 2017-08-11 08:08:59 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1480465]

Comment 5 Wade Mealing 2017-08-15 03:57:19 UTC
Statement:

This issue affects the Linux kernel packages as shipped with Red Hat
Enterprise Linux 5,6, 7 and MRG-2.

Future Linux kernel updates for the respective releases may address this issue.

Comment 7 Wade Mealing 2017-08-15 05:20:50 UTC
Additional information:

This mainly affects systems that have UFO (UDP fragment offload) enabled.

You can see if this is configured on or off with the ethool command:

# ethtool -k em1 |grep "udp-fragmentation-offload:"

udp-fragmentation-offload: off [fixed]


If enabled, disabling the UDP fragementation offload will mitigate this flaw and is documented in this solution: https://access.redhat.com/solutions/2127401

Comment 10 errata-xmlrpc 2017-10-19 13:27:17 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

Via RHSA-2017:2918 https://access.redhat.com/errata/RHSA-2017:2918

Comment 11 errata-xmlrpc 2017-10-19 15:06:56 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:2930 https://access.redhat.com/errata/RHSA-2017:2930

Comment 12 errata-xmlrpc 2017-10-19 15:10:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:2931 https://access.redhat.com/errata/RHSA-2017:2931

Comment 16 errata-xmlrpc 2017-11-14 20:39:08 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2017:3200 https://access.redhat.com/errata/RHSA-2017:3200

Comment 18 errata-xmlrpc 2019-07-29 16:49:23 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5.9 Long Life

Via RHSA-2019:1932 https://access.redhat.com/errata/RHSA-2019:1932

Comment 19 errata-xmlrpc 2019-07-29 16:50:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5 Extended Lifecycle Support

Via RHSA-2019:1931 https://access.redhat.com/errata/RHSA-2019:1931


Note You need to log in before you can comment on or make changes to this bug.