Bug 1243852 (CVE-2015-5156) - CVE-2015-5156 kernel: buffer overflow with fraglist larger than MAX_SKB_FRAGS + 2 in virtio-net
Summary: CVE-2015-5156 kernel: buffer overflow with fraglist larger than MAX_SKB_FRAGS...
Status: CLOSED ERRATA
Alias: CVE-2015-5156
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=moderate,public=20150806,repor...
Keywords: Security
Depends On: 1245995 1245996 1247839 1247840 1247841 1247844 1266515
Blocks: 1243854
TreeView+ depends on / blocked
 
Reported: 2015-07-16 13:14 UTC by Vasyl Kaigorodov
Modified: 2019-06-08 20:40 UTC (History)
27 users (show)

(edit)
A buffer overflow flaw was found in the way the Linux kernel's virtio-net subsystem handled certain fraglists when the GRO (Generic Receive Offload) functionality was enabled in a bridged network configuration. An attacker on the local network could potentially use this flaw to crash the system, or, although unlikely, elevate their privileges on the system.
Clone Of:
(edit)
Last Closed: 2016-05-11 07:28:29 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1977 normal SHIPPED_LIVE Moderate: kernel-rt security, bug fix, and enhancement update 2015-11-03 21:42:40 UTC
Red Hat Product Errata RHSA-2015:1978 normal SHIPPED_LIVE Moderate: kernel security, bug fix, and enhancement update 2015-11-03 23:47:34 UTC
Red Hat Product Errata RHSA-2016:0855 normal SHIPPED_LIVE Moderate: kernel security, bug fix, and enhancement update 2016-05-10 22:43:57 UTC

Description Vasyl Kaigorodov 2015-07-16 13:14:25 UTC
When a guests KVM network devices is in a bridge configuration the kernel can create a situation in which packets are fragmented in an unexpected fashion. The GRO functionality can create a situation in which multiple SKB's are chained together
in a single packets fraglist (by design).  

The virtio module declares support for NETIF_F_FRAGLIST and assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist, when GRO is enabled on the incoming driver it can create more fragments than expected.

A longer than expected fragment list in the socket buffer will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption.  It is unlikely that an attacker can use this as controlled memory corruption to execute arbitrary code.

Upstream patch: 
http://marc.info/?l=linux-netdev&m=143868216724068&w=2

References:
http://www.openwall.com/lists/oss-security/2015/08/06/1

Acknowledgements:

This issue was discovered by Jason Wang of Red Hat.

Comment 4 Wade Mealing 2015-07-29 04:27:30 UTC
Statement:

This issue did not affect the Linux kernel packages as shipped with Red Hat Enterprise MRG 2.

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 5. Red Hat Enterprise Linux 5 is now in Production 3 Phase of the support and maintenance life cycle. This has been rated as having Moderate security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.

Comment 7 Petr Matousek 2015-09-25 13:19:15 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1266515]

Comment 8 Fedora Update System 2015-10-16 06:57:29 UTC
kernel-4.2.3-200.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 errata-xmlrpc 2015-11-03 16:43:19 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2015:1977 https://rhn.redhat.com/errata/RHSA-2015-1977.html

Comment 11 Fedora Update System 2015-11-13 02:50:48 UTC
kernel-4.1.12-101.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 errata-xmlrpc 2016-05-10 22:52:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2016:0855 https://rhn.redhat.com/errata/RHSA-2016-0855.html


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