{"id":"CVE-2022-50227","state":"PUBLISHED","title":"KVM: x86/xen: Initialize Xen timer only once","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86/xen: Initialize Xen timer only once\n\nAdd a check for existing xen timers before initializing a new one.\n\nCurrently kvm_xen_init_timer() is called on every\nKVM_XEN_VCPU_ATTR_TYPE_TIMER, which is causing the following ODEBUG\ncrash when vcpu->arch.xen.timer is already set.\n\nODEBUG: init active (active state 0)\nobject type: hrtimer hint: xen_timer_callbac0\nRIP: 0010:debug_print_object+0x16e/0x250 lib/debugobjects.c:502\nCall Trace:\n__debug_object_init\ndebug_hrtimer_init\ndebug_init\nhrtimer_init\nkvm_xen_init_timer\nkvm_xen_vcpu_set_attr\nkvm_arch_vcpu_ioctl\nkvm_vcpu_ioctl\nvfs_ioctl","publishedAt":"2025-06-18T11:03:59.885Z","updatedAt":"2026-08-05T08:57:47.222Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"536395260582be7443b0b35b0bbb89ffe3947f62","status":"affected","lessThan":"9a9b5771e930f408c3419799000f76a9abaf2278","versionType":"git"},{"version":"536395260582be7443b0b35b0bbb89ffe3947f62","status":"affected","lessThan":"af735db31285fa699384c649be72a9f32ecbb665","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/kvm/xen.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"5.19.2","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/kvm/xen.c"]}],"references":["https://git.kernel.org/stable/c/9a9b5771e930f408c3419799000f76a9abaf2278","https://git.kernel.org/stable/c/af735db31285fa699384c649be72a9f32ecbb665"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50227.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50227","state":"PUBLISHED","datePublished":"2025-06-18T11:03:59.885Z","dateUpdated":"2026-08-05T08:57:47.222Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-06-18T10:57:27.432Z"},"containers":{"cna":{"title":"KVM: x86/xen: Initialize Xen timer only once","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86/xen: Initialize Xen timer only once\n\nAdd a check for existing xen timers before initializing a new one.\n\nCurrently kvm_xen_init_timer() is called on every\nKVM_XEN_VCPU_ATTR_TYPE_TIMER, which is causing the following ODEBUG\ncrash when vcpu->arch.xen.timer is already set.\n\nODEBUG: init active (active state 0)\nobject type: hrtimer hint: xen_timer_callbac0\nRIP: 0010:debug_print_object+0x16e/0x250 lib/debugobjects.c:502\nCall Trace:\n__debug_object_init\ndebug_hrtimer_init\ndebug_init\nhrtimer_init\nkvm_xen_init_timer\nkvm_xen_vcpu_set_attr\nkvm_arch_vcpu_ioctl\nkvm_vcpu_ioctl\nvfs_ioctl"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"536395260582be7443b0b35b0bbb89ffe3947f62","status":"affected","lessThan":"9a9b5771e930f408c3419799000f76a9abaf2278","versionType":"git"},{"version":"536395260582be7443b0b35b0bbb89ffe3947f62","status":"affected","lessThan":"af735db31285fa699384c649be72a9f32ecbb665","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/kvm/xen.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"5.19.2","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/kvm/xen.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/9a9b5771e930f408c3419799000f76a9abaf2278"},{"url":"https://git.kernel.org/stable/c/af735db31285fa699384c649be72a9f32ecbb665"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Triggered only via the host KVM_XEN_VCPU_SET_ATTR vCPU ioctl on /dev/kvm; guest Xen timer hypercalls call kvm_xen_start_timer but never kvm_xen_init_timer, so this is not remotely reachable.\nAC:L - An attacker with a vCPU fd can reliably reproduce by issuing KVM_XEN_VCPU_ATTR_TYPE_TIMER twice with a non-zero port and expires_ns, fully controlling both the initial arming and the re-init; no race or external condition is required.\nPR:L - Reachable by any unprivileged local user who can open /dev/kvm (typically kvm-group membership), create a VM/vCPU, and issue the ioctl; no CAP_SYS_ADMIN or init-namespace root is required.\nUI:N - Exploitation is entirely attacker-driven through ioctl calls; no victim action is needed.\nS:U - This is host userspace (VMM) corrupting the host kernel timer subsystem, not a guest-to-host escape; impact stays within the host kernel authority.\nC:H - Without DEBUG_OBJECTS, hrtimer_init memset()s an still-enqueued hrtimer, corrupting the timerqueue rbtree and enabling use-after-free primitives that can yield arbitrary kernel reads.\nI:H - The same timer-queue corruption provides a write/UAF primitive against kernel timer structures, which can be leveraged for control-flow hijacking or arbitrary writes.\nA:H - Re-init of an active hrtimer causes kernel WARN/oops under debugobjects and timer-subsystem crashes or hangs on production kernels when the corrupted rbtree is walked."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:57:47.222Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"5.19.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}