Bug 2089815 (CVE-2022-1852)

Summary: CVE-2022-1852 kernel: NULL pointer dereference in x86_emulate_insn may lead to DoS
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, bdettelb, bhu, bskeggs, chwhite, crwood, ddepaula, dhoward, dvlasenk, fhrbata, hdegoede, hkrzesin, hpa, jarod, jarodwilson, jburrell, jfaracco, jferlan, jforbes, jglisse, jlelli, joe.lawrence, jonathan, josef, jshortt, jstancek, juneau, jwboyer, jwyatt, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, lzampier, masami256, mchehab, nmurray, ptalbert, qzhao, rkeshri, rvrbovsk, scweaver, security-response-team, steved, vkumar, walters, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 5.19 rc1 Doc Type: If docs needed, set a value
Doc Text:
A NULL pointer dereference flaw was found in the Linux kernel’s KVM module, which can lead to a denial of service in the x86_emulate_insn in arch/x86/kvm/emulate.c. This flaw occurs while executing an illegal instruction in guest in the Intel CPU.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-05 09:03:08 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: 2090426, 2090427, 2090428, 2090429, 2092232, 2115240    
Bug Blocks: 2089816, 2090106    

Description Marian Rehak 2022-05-24 13:42:06 UTC
When we execute an illegal instruction in guest in Intel CPU, such as invlpga(an AMD instruction), which will cause an exception nmi VM-exit. KVM will call handle_exception_nmi to deal with it. Then handle_exception_nmi will call handle_ud to emulate the undefined instruction. Finally, it will call x86_decode_insn. In x86_decode_insn function, CheckPerm will be set into ctxt->d and ctxt->check_perm will be set to NULL due to the check permition callback function of illegal instruction is not exists.

Comment 7 Mauro Matteo Cascella 2022-06-01 07:21:38 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2092232]

Comment 9 Mauro Matteo Cascella 2022-06-17 12:39:28 UTC
Upstream fix:
https://github.com/torvalds/linux/commit/fee060cd52d69c114b62d1a2948ea9648b5131f9

Comment 12 errata-xmlrpc 2022-11-08 09:10:15 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:7444 https://access.redhat.com/errata/RHSA-2022:7444

Comment 13 errata-xmlrpc 2022-11-08 10:09:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:7683 https://access.redhat.com/errata/RHSA-2022:7683

Comment 14 errata-xmlrpc 2022-11-15 09:45:11 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:7933 https://access.redhat.com/errata/RHSA-2022:7933

Comment 15 errata-xmlrpc 2022-11-15 10:48:13 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:8267 https://access.redhat.com/errata/RHSA-2022:8267

Comment 16 Product Security DevOps Team 2022-12-05 09:03: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-2022-1852

Comment 20 errata-xmlrpc 2024-04-18 02:29:25 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2024:1877 https://access.redhat.com/errata/RHSA-2024:1877