CVE-2025-21822 ptp: vmclock: Set driver data before its usage
A null pointer dereference in the Linux kernel vmclock driver can cause a system crash during device removal if registration fails.
- 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-2025-21822?
CVE-2025-21822 is a medium-severity vulnerability in Linux kernel, published on 27 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:
ptp: vmclock: Set driver data before its usage
If vmclock_ptp_register() fails during probing, vmclock_remove() is called to clean up the ptp clock and misc device. It uses dev_get_drvdata() to access the vmclock state. However the driver data is not yet set at this point.
Assign the driver data earlier.
Which versions are affected by CVE-2025-21822?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-21822?
Apply the vendor's patch.
Is CVE-2025-21822 being exploited?
There is no known exploitation of CVE-2025-21822 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-21822, GHSA-5jx9-3p7f-55g3, UBUNTU-CVE-2025-21822.