Bug 1389258 (CVE-2016-9083)

Summary: CVE-2016-9083 kernel: State machine confusion bug in vfio driver leading to memory corruption
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: aquini, arm-mgr, bhu, carnil, dhoward, fhrbata, gansalmon, iboverma, ichavero, itamar, jforbes, jkacur, joelsmith, jonathan, jross, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, madhu.chinakonda, matt, mchehab, mcressma, nmurray, pholasek, plougher, pmatouse, rt-maint, rvrbovsk, slawomir, williams, wmealing
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was discovered in the Linux kernel's implementation of VFIO. An attacker issuing an ioctl can create a situation where memory is corrupted and modify memory outside of the expected area. This may overwrite kernel memory and subvert kernel execution.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 03:01:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1389285, 1394627, 1394628, 1394629, 1394630, 1394631, 1394632    
Bug Blocks: 1389281    

Description Adam Mariš 2016-10-27 09:52:25 UTC
A flaw was discovered in the Linux kernels implementation of VFIO. While issuing an IOCTL, the VFIO_DEVICE_SET_IRQS parameter for vfio PCI devices has a state machine confusion bug where specifying VFIO_IRQ_SET_DATA_NONE along with another bit in VFIO_IRQ_SET_DATA_TYPE_MASK in hdr.flags allows integer overflow checks to be skipped for hdr.start/hdr.count. 

This might allow memory corruption later in vfio_pci_set_msi_trigger() with user access to an appropriate vfio device file, but it seems difficult to usefully exploit in practice.

Proposed patch:

https://patchwork.kernel.org/patch/9373631/

CVE assignment:

http://seclists.org/oss-sec/2016/q4/251

Comment 1 Adam Mariš 2016-10-27 11:26:06 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1389285]

Comment 2 Wade Mealing 2016-11-14 04:46:07 UTC
Statement:

This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5, 6 and Red Hat Enterprise MRG 2.

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 7. This has been rated as having Moderate security impact and is  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 9 errata-xmlrpc 2017-03-02 17:13:30 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:0386 https://rhn.redhat.com/errata/RHSA-2017-0386.html

Comment 10 errata-xmlrpc 2017-03-02 17:23:22 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:0387 https://rhn.redhat.com/errata/RHSA-2017-0387.html