Bug 950490 (CVE-2013-1943)

Summary: CVE-2013-1943 kernel: kvm: missing check in kvm_set_memory_region()
Product: [Other] Security Response Reporter: Petr Matousek <pmatouse>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: aarcange, abaron, agordeev, anton, aortega, apevec, areis, ayoung, chrisw, dallan, dhoward, drjones, ehabkost, fhrbata, gleb, imammedo, kernel-mgr, knoel, lersek, lwang, lz_yuting, markmc, minovotn, mkenneth, mst, mtosatti, npajkovs, pbonzini, rbryant, rcvalle, rhod, rkhan, sclewis, security-response-team, tgraf, ybabar
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: 2013-08-24 14:01:30 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: 950496, 950498    
Bug Blocks: 950502    

Description Petr Matousek 2013-04-10 10:47:00 UTC
A check for valid userspace memory was found missing in kvm_set_memory_region() function. Because of that, memory regions pointing to kernel memory could be registered with KVM and later used when converting guest physical addresses to host virtual ones. Several call sites relied on the validation and were using read/write functions that were missing the access_ok() check when accessing userspace memory.

A local unprivileged user on Red Hat Enterprise Linux 6 system could use this flaw to escalate their privileges on the system.

On Red Hat Enterprise Linux 6.2 EUS and Red Hat Enterprise Linux 6.3 EUS the impact is limited to potential information leak only.

A local user on Red Hat Enterprise Linux 5 system able to write to /dev/kvm could possibly use this flaw to leak kernel memory.

Upstream fixes:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fa3d315a4ce2c0891cdde262562e710d95fba19e
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9e3bb6b6f6a0c535eb053fbf0005a8e79e053374

Acknowledgements:

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

Comment 1 Petr Matousek 2013-04-10 10:55:06 UTC
Statement:

This issue does not affect the versions of Linux kernel as shipped with Red Hat Enterprise MRG 2.

Future kvm updates for Red Hat Enterprise Linux 5 may address this flaw.

This issue was addresses in Red Hat Enterprise Linux 6 via RHSA-2013:0911 (https://rhn.redhat.com/errata/RHSA-2013-0911.html).

Please note that unlike Red Hat Enterprise Linux 6, where a local unprivileged user could use this flaw to escalate their privileges on the system, on Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6.2 EUS, and Red Hat Enterprise Linux 6.3 EUS the impact is limited to potential information leak only.

Comment 6 errata-xmlrpc 2013-06-10 21:52:05 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2013:0911 https://rhn.redhat.com/errata/RHSA-2013-0911.html