CVE-2026-63942: parport: Fix race between port and client registration
In the Linux kernel, the following vulnerability has been resolved:
parport: Fix race between port and client registration
The parport subsystem registers port devices before they are fully initialised, resulting in a race condition where client drivers such as lp can attach to ports that are not completely initialised or even being torn down.
When the port and client drivers are built as modules and loaded around the same time during boot, this occasionally results in a crash. I was able to make this happen reliably in a VM with a PC-style parallel port by patching parportpc to fail probing:
--- a/drivers/parport/parportpc.c +++ b/drivers/parport/parportpc.c @@ -2069,7 +2069,7 @@ static struct parport parportpcprobeport(unsigned long int base, if (!p) goto out3; - baseres = requestregion(base, 3, p->name); + baseres = NULL; if (!baseres) goto out4;
and then running:
while true; do modprobe lp & modprobe parportpc wait rmmod lp parportpc done
for a few seconds.
In the long term I think port registration should be changed to put the call to deviceadd() inside parportannounceport(), but since the latter currently cannot fail this will require changing all port drivers.
For now, add a flag to indicate whether a port has been "announced" and only try to attach client drivers to ports when the flag is set.
Affected Software
Event History
Frequently Asked Questions
Which systems are most likely to encounter this issue?
Systems using the parport subsystem are exposed when a client driver such as lp can attach while a parallel-port driver is still initializing or is being removed. The reported failure occurs when the relevant port and client drivers are built as modules and loaded at approximately the same time during boot.
What level of access is involved in exploiting the race?
The CVSS vector identifies this as a local issue requiring low privileges and no user interaction. The demonstrated trigger repeatedly loads lp and parport_pc modules and then removes them, creating concurrent registration and teardown activity.
What is the observed impact of triggering the race?
A client driver can attach to a port that is not fully initialized or is being torn down, which can cause a kernel crash. The vulnerability is rated high with impacts to confidentiality, integrity, and availability in the supplied CVSS vector.