Bug 1243465 (CVE-2015-3290)

Summary: CVE-2015-3290 kernel: x86: nested NMI handler and espfix64 interaction privilege escalation
Product: [Other] Security Response Reporter: Martin Prpič <mprpic>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: agordeev, aquini, bhu, dhoward, esammons, fhrbata, iboverma, jkacur, jross, kernel-mgr, kstutsma, lgoncalv, lwang, matt, mcressma, mguzik, nmurray, pholasek, plougher, pmatouse, rvrbovsk, security-response-team, vkaigoro, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A flaw was found in the way the Linux kernel's nested NMI handler and espfix64 functionalities interacted during NMI processing. A local, unprivileged user could use this flaw to crash the system or, potentially, escalate their privileges on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-23 07:35:53 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: 1245936    
Bug Blocks: 1243467    

Description Martin Prpič 2015-07-15 13:42:15 UTC
A flaw was found in the way Linux kernel's nested NMI handler and espfix64 functionalities interacted during NMI processing.

A local, unprivileged user could use this flaw to crash the system or, potentially, escalate their privileges on the system.

Upstream fix:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9b6e6a8334d56354853f9c255d1395c2ba570e0a

Acknowledgements:

Red Hat would like to thank Andy Lutomirski for reporting this issue.

Comment 2 Petr Matousek 2015-07-23 07:23:42 UTC
In order to exploit this issue non-root (non-privileged) user needs to make the Linux kernel's NMI handler perform an iret instruction, which re-enables NMIs and thus the nested NMI code path in the NMI handler is exercised.

To our knowledge, an unprivileged local user can do that since upstream commit https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e00b12e64be9a34ef071de7b6052ca9ea29dd460.

Comment 3 Petr Matousek 2015-07-23 07:35:53 UTC
Statement:

This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5 and 6 since they did not backport the nested NMI handler and espfix64 functionalities.

This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 7 and Red Hat Enterprise MRG 2 since they did not backport the espfix64 functionality and also did not backport upstream commit e00b12e64be9a3 that allowed an unprivileged local user to re-enable NMIs from the NMI handler.

Comment 4 Petr Matousek 2015-07-23 07:37:57 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1245936]