Bug 773370 (CVE-2012-0045)

Summary: CVE-2012-0045 kernel: kvm: syscall instruction induced guest panic
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: areis, arozansk, bhu, dhoward, ehabkost, fhrbata, gansalmon, itamar, jkacur, jonathan, jwboyer, kernel-maint, kernel-mgr, lcapitulino, lgoncalv, madhu.chinakonda, mkenneth, mtosatti, nobody, rt-maint, vgoyal, virt-maint, williams
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: 2021-10-19 21:51:25 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: 773390, 773391, 773392    
Bug Blocks: 773374    

Description Petr Matousek 2012-01-11 16:56:13 UTC
32bit guests will crash (and 64bit guests may behave in a
wrong way) for example by simply executing following
nasm-demo-application:

    [bits 32]
    global _start
    SECTION .text
    _start: syscall

The reason seems a missing "invalid opcode"-trap (int6) for the
syscall opcode "0f05", which is not available on Intel CPUs
within non-longmodes, as also on some AMD CPUs within legacy-mode.
(depending on CPU vendor, MSR_EFER and cpuid)

Because previous mentioned OSs may not engage corresponding
syscall target-registers (STAR, LSTAR, CSTAR), they remain
NULL and (non trapping) syscalls are leading to multiple
faults and finally crashs.

Reference:
https://lkml.org/lkml/2011/12/28/170
http://www.spinics.net/lists/kvm/msg66633.html

Proposed patch:
http://www.spinics.net/lists/kvm/msg66633.html

Acknowledgements:

Red Hat would like to thank Stephan Bärwolf for reporting this issue.

Comment 2 Petr Matousek 2012-01-11 18:09:30 UTC
Created kernel tracking bugs for this issue

Affects: fedora-all [bug 773392]

Comment 4 Petr Matousek 2012-01-11 20:15:05 UTC
Introduced by e66bb2ccdcf76d032bbb464b35c292bb3ee58f9b in linux-2.6.32

Comment 5 Kurt Seifried 2012-01-12 00:11:39 UTC
Added CVE-2012-0045 as per http://www.openwall.com/lists/oss-security/2012/01/12/2

Comment 7 Petr Matousek 2012-01-16 17:03:11 UTC
*** Bug 782123 has been marked as a duplicate of this bug. ***

Comment 8 Petr Matousek 2012-01-18 21:05:47 UTC
Statement:

This issue did not affect the versions of Linux kernel as shipped with Red Hat Enterprise Linux 4 and Red Hat Enterprise MRG as they did not provide support for the KVM subsystem. This issue did not affect the versions of kvm as shipped with Red Hat Enterprise Linux 5 as they did not include support for syscall instruction emulation. This has been addressed in Red Hat Enterprise Linux 6 via https://rhn.redhat.com/errata/RHSA-2012-0350.html.

Comment 10 errata-xmlrpc 2012-03-06 18:46:34 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2012:0350 https://rhn.redhat.com/errata/RHSA-2012-0350.html

Comment 11 errata-xmlrpc 2012-03-26 15:18:16 UTC
This issue has been addressed in following products:

  RHEV-H and Agents for RHEL-6

Via RHSA-2012:0422 https://rhn.redhat.com/errata/RHSA-2012-0422.html