CVE-2022-50227: KVM: x86/xen: Initialize Xen timer only once
In the Linux kernel, the following vulnerability has been resolved:
KVM: x86/xen: Initialize Xen timer only once
Add a check for existing xen timers before initializing a new one.
Currently kvmxeninittimer() is called on every KVMXENVCPUATTRTYPETIMER, which is causing the following ODEBUG crash when vcpu->arch.xen.timer is already set.
ODEBUG: init active (active state 0) object type: hrtimer hint: xentimercallbac0 RIP: 0010:debugprintobject+0x16e/0x250 lib/debugobjects.c:502 Call Trace: debugobjectinit debughrtimerinit debuginit hrtimerinit kvmxeninittimer kvmxenvcpusetattr kvmarchvcpuioctl kvmvcpuioctl vfsioctl
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Before calling kvm_xen_init_timer() (from kvm_xen_vcpu_set_attr for KVM_XEN_VCPU_ATTR_TYPE_TIMER), add a check whether vcpu->arch.xen.timer is already set; if it is set, do not initialize a new timer (prevent crash from calling hrtimer init again when vcpu->arch.xen.timer is already present).
Linux kernel KVM x86 Xen timer initialization Initialize Xen timer only once for KVM_XEN_VCPU_ATTR_TYPE_TIMER = enabled
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50227?
CVE-2022-50227 has been classified as a medium severity vulnerability.
How do I fix CVE-2022-50227?
To fix CVE-2022-50227, update your Linux kernel to the latest stable version that includes the patch.
What type of vulnerabilities does CVE-2022-50227 address?
CVE-2022-50227 addresses a timing initialization issue in the KVM component of the Linux kernel.
Is CVE-2022-50227 exploitable remotely?
CVE-2022-50227 is not known to be remotely exploitable and typically requires local access to the system.
What does the fix for CVE-2022-50227 entail?
The fix for CVE-2022-50227 involves adding a check for existing Xen timers before initializing a new one.