CVE-2026-143001: serial: 8250_exar: check priv->gpio properly
In the Linux kernel, the following vulnerability has been resolved:
serial: 8250exar: check priv->gpio properly
priv->gpio is set by platformdeviceregisterfull(), which returns error-encoded pointers on failure, not NULL. Sashiko reported:
Does xr17v35xregistergpio() return an ERRPTR if platformdeviceregisterfull() fails? If it does, we might be storing an error pointer directly into priv->gpio in xr17v35xregistergpio() without validating it with ISERR(). Because the error is ignored, the device probe successfully continues.
Before commit 1145d1a0703f ("serial: 8250exar: use platformdeviceregisterfull()"), xr17v35xregistergpio() returned NULL on any failure (platformdevicealloc(), deviceaddsoftwarenode() or platformdeviceadd() failing were all turned into a NULL return). The plain truthy check in xr17v35xunregistergpio() matched that convention. That commit switched registration to platformdeviceregisterfull(), which reports failure as an ERRPTR() instead of NULL, but the unregister check was never updated to match. As a result, a failed registration left an error pointer in priv->gpio, and unbind would tear it down as if it were a real platformdevice, dereferencing the encoded error value in deviceremovesoftwarenode() and platformdeviceunregister().
Use ISERRORNULL() instead, so both the unset (non-EXAR vendor, priv->gpio never assigned) and failed-registration (ERRPTR) cases are skipped.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.7-1 - Compensating control
In xr17v35x_unregister_gpio(), use IS_ERR_OR_NULL() to check priv->gpio before unregistering it.
Event History
Frequently Asked Questions
What conditions are needed to trigger the issue?
The 8250_exar driver's GPIO platform-device registration must fail, causing platform_device_register_full() to return an error-encoded pointer. The affected device must then be unbound, which causes the driver to treat that error pointer as a valid GPIO device during teardown.
Does a GPIO registration failure prevent the device from probing?
No. The registration error is ignored, so device probe can continue successfully while priv->gpio retains an error pointer.
Which deployments are realistically exposed?
Exposure is limited to Linux systems using the 8250_exar serial driver path that registers its GPIO device and encounters a registration failure. The provided data does not identify affected kernel versions or configuration defaults.