Bug 1163075 (CVE-2014-7840)

Summary: CVE-2014-7840 qemu: insufficient parameter validation during ram load
Product: [Other] Security Response Reporter: Petr Matousek <pmatouse>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abaron, amit.shah, apevec, areis, ayoung, berrange, carnil, cfergeau, chrisw, dallan, dwmw2, ehabkost, gkotton, itamar, jrusnack, knoel, lhh, lpeer, markmc, mkenneth, mrezanin, mst, mtosatti, pbonzini, rbryant, rjones, sclewis, scottt.tw, srevivo, stefanha, virt-maint, virt-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
It was found that certain values that were read when loading RAM during migration were not validated. A user able to alter the savevm data (either on the disk or over the wire during migration) could use either of these flaws to corrupt QEMU process memory on the (destination) host, which could potentially result in arbitrary code execution on the host with the privileges of the QEMU process.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:36:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1163077, 1163078, 1163079, 1163080    
Bug Blocks: 1162403    

Description Petr Matousek 2014-11-12 10:41:17 UTC
During migration, the values read from migration stream during ram 
load are not validated. Especially offset in host_from_stream_offset()
and also the length of the writes in the callers of the said function.

A user able to alter the savevm data (either on the disk or over the
wire during migration) could use either of these flaws to corrupt QEMU
process memory on the (destination) host, which could potentially
result in arbitrary code execution on the host with the privileges of
the QEMU process.

Acknowledgements:

This issue was discovered by Michael S. Tsirkin of Red Hat.

Comment 1 Petr Matousek 2014-11-12 10:43:06 UTC
Statement:

This issue affects the qemu-kvm packages as shipped with Red Hat Enterprise 
Linux 5, 6 and 7. Future updates for the respective releases may address this 
issue.

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 2 Petr Matousek 2014-11-12 10:43:50 UTC
Upstream patch submission --

http://thread.gmane.org/gmane.comp.emulators.qemu/306117

Comment 5 Petr Matousek 2014-11-12 10:47:31 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 1163080]

Comment 7 Fedora Update System 2014-12-12 04:26:55 UTC
qemu-2.1.2-7.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2014-12-23 18:30:21 UTC
qemu-1.6.2-12.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 errata-xmlrpc 2015-03-05 08:13:52 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 10 errata-xmlrpc 2015-03-05 09:58:15 UTC
This issue has been addressed in the following products:

  RHEV-H and Agents for RHEL-7

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