Bug 2089815 (CVE-2022-1852) - CVE-2022-1852 kernel: NULL pointer dereference in x86_emulate_insn may lead to DoS
Summary: CVE-2022-1852 kernel: NULL pointer dereference in x86_emulate_insn may lead t...
Keywords:
Status: NEW
Alias: CVE-2022-1852
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2090426 2090427 2090428 2090429 2092232
Blocks: 2089816 2090106
TreeView+ depends on / blocked
 
Reported: 2022-05-24 13:42 UTC by Marian Rehak
Modified: 2022-07-16 03:21 UTC (History)
50 users (show)

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.
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.