CVE-2022-49989 xen/privcmd: fix error exit of privcmd_ioctl_dm_op()
A null pointer dereference in the Linux kernel's Xen privcmd driver can cause a system crash, requiring a kernel patch.
- 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-49989?
CVE-2022-49989 is a medium-severity vulnerability in Linux kernel, published on 18 Jun 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:
xen/privcmd: fix error exit of privcmd_ioctl_dm_op()
The error exit of privcmd_ioctl_dm_op() is calling unlock_pages() potentially with pages being NULL, leading to a NULL dereference.
Additionally lock_pages() doesn't check for pin_user_pages_fast() having been completely successful, resulting in potentially not locking all pages into memory. This could result in sporadic failures when using the related memory in user mode.
Fix all of that by calling unlock_pages() always with the real number of pinned pages, which will be zero in case pages being NULL, and by checking the number of pages pinned by pin_user_pages_fast() matching the expected number of pages.
Weakness: CWE-476
Which versions are affected by CVE-2022-49989?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-49989?
Apply the vendor's patch.
Is CVE-2022-49989 being exploited?
There is no known exploitation of CVE-2022-49989 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-49989, GHSA-3vrh-9v2m-f8xc, UBUNTU-CVE-2022-49989.