CVE-2022-49568 KVM: Don't null dereference ops->destroy

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel's KVM subsystem allows local attackers to cause a denial of service via improper device cleanup handling.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-49568?

CVE-2022-49568 is a medium-severity vulnerability in Linux kernel, published on 26 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

KVM: Don't null dereference ops->destroy

A KVM device cleanup happens in either of two callbacks: 1) destroy() which is called when the VM is being destroyed; 2) release() which is called when a device fd is closed.

Most KVM devices use 1) but Book3s's interrupt controller KVM devices (XICS, XIVE, XIVE-native) use 2) as they need to close and reopen during the machine execution. The error handling in kvm_ioctl_create_device() assumes destroy() is always defined which leads to NULL dereference as discovered by Syzkaller.

This adds a checks for destroy!=NULL and adds a missing release().

This is not changing kvm_destroy_devices() as devices with defined release() should have been removed from the KVM devices list by then.

Weakness: CWE-476

Which versions are affected by CVE-2022-49568?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-49568?

Apply the vendor's patch.

Is CVE-2022-49568 being exploited?

There is no known exploitation of CVE-2022-49568 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-49568, GHSA-vpqc-5phg-hjvg, UBUNTU-CVE-2022-49568.

Is CVE-2022-49568 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free