ptp: vmclock: Set driver data before its usage
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel vmclock driver can call its cleanup function before setting the driver data it needs, if PTP clock registration fails during probing. The input does not specify an attacker action or impact, or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the vmclock driver should check their versions; affected versions are not specified.