Bug 1079240 (CVE-2014-0144)

Summary: CVE-2014-0144 Qemu: block: missing input validation
Product: [Other] Security Response Reporter: Prasad Pandit <ppandit>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: areis, gmollett, jkurik, jrusnack, knoel, kwolf, mkenneth, mrezanin, mtosatti, osoukup, pmatouse, rbalakri, rpacheco, security-response-team, stefanha
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-27 13:11:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1079449, 1079450, 1079452, 1079453, 1079455, 1086735, 1087112, 1087126, 1087140, 1108461    
Bug Blocks: 1066967, 1086694    

Description Prasad Pandit 2014-03-21 09:25:47 UTC
Qemu block drivers for CLOOP, QCOW2 version 2 and various other image formats
are vulnerable to potential memory corruptions, integer/buffer overflows or
crash caused by missing input validations.

An user able to alter the Qemu disk image files loaded by a guest could use
this flaw to crash the Qemu instance resulting in DoS or corrupt QEMU process
memory on the host, which could potentially result in arbitrary code execution
on the host with the privileges of the QEMU process.

Upstream fixes:
---------------
qcow2: Validate active L1 table offset and size
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=2d51c32c4b511db8bb9e58208f1e2c25e4c06c85

qcow2: Validate snapshot table offset/size
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=ce48f2f441ca98885267af6fd636a7cb804ee646

qcow2: Check refcount table size
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=5dab2faddc8eaa1fb1abdbe2f502001fc13a1b21

qcow2: Check backing_file_offset
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=a1b3955c9415b1e767c130a2f59fee6aa28e575b

qcow2: Check header_length
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=24342f2cae47d03911e346fe1e520b00dc2818e0

curl: check data size before memcpy to local buffer
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=6d4b9e55fc625514a38d27cff4b9933f617fa7dc

vdi: add bounds checks for blocks_in_image and disk_size
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=63fa06dc978f3669dbfd9443b33cde9e2a7f4b41

vpc/vhd: add bounds check for max_table_entries
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=97f1c45c6f456572e5b504b8614e4a69e23b8e3a

block/cloop: refuse images with bogus offsets
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=f56b9bc3ae20fc93815b34aa022be919941406ce

block/cloop: refuse images with huge offsets arrays
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=7b103b36d6ef3b11827c203d3a793bf7da50ecd6

block/cloop: validate block_size header field
  -> http://git.qemu.org/?p=qemu.git;a=commit;h=d65f97a82c4ed48374a764c769d4ba1ea9724e97

Comment 1 Prasad Pandit 2014-03-21 10:29:31 UTC
Statement:

This issue affects the versions of kvm package as shipped with Red Hat
Enterprise Linux 5.

This issue affects the versions of qemu-kvm package as shipped with Red Hat
Enterprise Linux 6.

Comment 8 Prasad Pandit 2014-04-11 11:56:01 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 1086735]

Comment 12 errata-xmlrpc 2014-04-22 17:41:34 UTC
This issue has been addressed in following products:

  RHEV-H and Agents for RHEL-6

Via RHSA-2014:0421 https://rhn.redhat.com/errata/RHSA-2014-0421.html

Comment 13 errata-xmlrpc 2014-04-22 17:45:00 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2014:0420 https://rhn.redhat.com/errata/RHSA-2014-0420.html

Comment 14 errata-xmlrpc 2014-04-24 17:37:46 UTC
This issue has been addressed in following products:

  OpenStack 3 for RHEL 6

Via RHSA-2014:0435 https://rhn.redhat.com/errata/RHSA-2014-0435.html

Comment 15 errata-xmlrpc 2014-04-24 17:40:00 UTC
This issue has been addressed in following products:

  OpenStack 4 for RHEL 6

Via RHSA-2014:0434 https://rhn.redhat.com/errata/RHSA-2014-0434.html

Comment 16 Fedora Update System 2014-05-01 22:26:31 UTC
qemu-1.6.2-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 errata-xmlrpc 2014-06-09 14:37:45 UTC
This issue has been addressed in following products:

  RHEV-H and Agents for RHEL-6

Via RHSA-2014:0674 https://rhn.redhat.com/errata/RHSA-2014-0674.html