Bug 1819615 (CVE-2020-8834)

Summary: CVE-2020-8834 Kernel: ppc: kvm: conflicting use of HSTATE_HOST_R1 to store r1 state leads to host stack corruption
Product: [Other] Security Response Reporter: Dhananjay Arunesh <darunesh>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: acaringi, airlied, bhu, blc, bmasney, brdeoliv, bskeggs, dhoward, dvlasenk, esammons, fhrbata, hdegoede, hkrzesin, iboverma, ichavero, itamar, jarodwilson, jeremy, jforbes, jglisse, jlelli, jmaloy, john.j5live, jonathan, josef, jross, jshortt, jstancek, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, linville, masami256, matt, mchehab, mcressma, mdeng, mjg59, mlangsdo, nmurray, ppandit, qzhang, qzhao, rt-maint, rvrbovsk, security-response-team, steved, williams, xuma
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Linux-4.18 Doc Type: Bug Fix
Doc Text:
A flaw was found in the way the KVM hypervisor on the Power8 processor stores the r1 register state in the 'HSTATE_HOST_R1' field on the Linux kernel stack. This flaw occurs while handling hypercalls in Transactional Memory (TM) suspend mode in the kvmppc_save_tm and kvmppc_restore_tm routines, leading to host stack corruption. R1 register holds a stack frame address and its corruption leads the kernel into panic state. A guest user can use this flaw to crash the host kernel, resulting in a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-07 19:28:05 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: 1821909, 1822166, 1823276, 1823277, 1823278, 1823279, 1823280, 1823281, 1823282, 1823283    
Bug Blocks: 1819617    

Description Dhananjay Arunesh 2020-04-01 07:59:48 UTC
A flaw was found in the way the KVM hypervisor on the Power8 processor stores the r1 register state in the 'HSTATE_HOST_R1' field on the Linux kernel stack. This flaw occurs while handling hypercalls in Transactional Memory (TM) suspend mode in the kvmppc_save_tm and kvmppc_restore_tm routines, leading to host stack corruption. R1 register holds a stack frame address and its corruption leads the kernel into panic state. A guest user can use this flaw to crash the host kernel, resulting in a denial of service.

Upstream patch:
---------------
  -> https://git.kernel.org/linus/6f597c6b63b6f3675914b5ec8fcd008a58678650
  -> https://git.kernel.org/linus/009c872a8bc4d38f487a9bd62423d019e4322517
  -> https://git.kernel.org/linus/7b0e827c6970e8ca77c60ae87592204c39e41245

Comment 2 Prasad Pandit 2020-04-07 19:41:23 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1821909]

Comment 4 Justin M. Forbes 2020-04-08 13:24:25 UTC
This was fixed for Fedora with the 4.18 kernel rebases.

Comment 6 Prasad Pandit 2020-04-13 06:38:49 UTC
Acknowledgments:

Name: Gustavo Romero, Paul Mackerras

Comment 7 Prasad Pandit 2020-04-13 06:46:25 UTC
Statement:

This issue does not affect the versions of the Linux kernel as shipped with the Red Hat Enterprise Linux 5, 6, 8 and Red Hat Enterprise MRG 2.
This issue affects the versions of the kernel package as shipped with the Red Hat Enterprise Linux 7. Future kernel updates for the Red Hat Enterprise Linux 7 may address this issue.

Comment 23 errata-xmlrpc 2020-07-07 13:18:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2020:2854 https://access.redhat.com/errata/RHSA-2020:2854

Comment 24 Product Security DevOps Team 2020-07-07 19:28:05 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-8834