CVE-2026-138819: serial: 8250_exar: store the GPIO platform device in struct exar8250

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

serial: 8250exar: store the GPIO platform device in struct exar8250

The GPIO platform device is registered via platform->registergpio() when port 0 is being set up. It is stored to port->port.privatedata of the on-stack uart template (and from there it is copied into every registered port). pcixr17v35xexit() then fetches it back by serial8250getport(priv->line[0]).

But port 0 does not have to exist at that point. If serial8250register8250port() fails for port 0, priv->line[0] holds a negative error code. The probe still succeeds (it only breaks the loop), so on unbind, priv->line[0] (a negative value) is passed to serial8250getport(). The GPIO device is never unregistered and a bogus port is accessed.

The same problem would also occur after the planned conversion of serial8250register8250port() to return a uart port instead of a line. As Sashiko pointed out in that case: If board->setup() fails for the first port (i=0) in exarpciprobe(), priv->uport[0] remains NULL. If serial8250register8250port() fails, it returns an ERRPTR. In either case, the loop breaks and probe returns success. When the device is later unbound, pcixr17v35xexit() unconditionally passes priv->uport[0] to platform->unregistergpio(), which will dereference it without checking for validity.

The GPIO device belongs to the PCI device, not to any particular port. So store it in a new struct exar8250::gpio member. Pass priv to both ->registergpio() and ->unregistergpio(), so that pcixr17v35xexit() does not need to look up any port at all.

Affected Software

12 affected componentsFixes available
Linux Linux kernel
linux/kernel>=4.11.0<5.10.275
5.10.275
linux/kernel>=5.11.0<5.15.226
5.15.226
linux/kernel>=5.16.0<6.1.193
6.1.193
linux/kernel>=6.2.0<6.6.163
6.6.163
linux/kernel>=6.7.0<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.63
6.18.63
linux/kernel>=6.19.0<7.3.4
7.3.4
debian/linux*
debian/linux<6.12.117-1
6.12.117-1
debian/linux<7.3.4-1
7.3.4-1
debian/linux<=6.1.176-1, <=6.1.192-3
6.12.117-17.3.4-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.10.275
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.15.226
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.1.193
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.6.163
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.117
  6. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.63
  7. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.4
  8. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.117-1
  9. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.4-1
  10. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.117-1Fixed in 7.3.4-1

Event History

Nov 30, 2026
CVE Published
via MITRE·01:25 PM
Data Sourced
via MITRE·01:25 PM
Description
Data Sourced
via OSV·01:25 PM
DescriptionAffected Software
Data Sourced
via NVD·02:17 PM
Description

Frequently Asked Questions

1

Which systems are exposed to the faulty cleanup path?

Systems using the Linux kernel's 8250_exar serial driver are exposed when setup or registration of the first serial port fails, but the driver probe still succeeds. The issue is triggered later when the device is unbound.

2

What indicates that this condition has occurred?

A failure to register port 0 can leave its recorded line value negative while probe succeeds. During unbind, the driver may use that invalid value to access a bogus serial port, and the GPIO platform device may remain registered instead of being unregistered.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203