CVE-2026-139639

serial: 8250_mxpcie: only unregister the ports that were registered

Published Nov 30, 2026 CVSS 3.1 · 4.1 Medium EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

serial: 8250_mxpcie: only unregister the ports that were registered

When serial8250_register_8250_port() fails the loop stops and the probe
keeps the ports registered so far, like pciserial_init_ports() in
8250_pci.c this driver was split from. What the split lost is that
function's priv->nr: mxpcie8250_remove() walks all num_ports entries,
but the ones the loop never reached keep the zero devm_kzalloc() left
there, and the one that failed keeps a negative error code.

serial8250_unregister_port() checks neither, so removal unregisters
line 0 - a port this driver does not own - and indexes
serial8250_ports[] with a negative line number.

Record how many ports were registered and unregister only those.

Analysis

AI-generated

Technical impact

During startup the driver attempts to register PCIe serial ports but aborts if one fails, leaving some ports registered and a negative error value for the failed port. When the device is later removed the driver blindly unregisters the first port (port 0) and then indexes the serial port array with that negative error code. This out‑of‑bounds access corrupts memory and causes a kernel panic, disabling the system. The direct effect is a denial of service via a kernel crash, with the potential to affect all processes and services that rely on the kernel’s stability.

Affected Systems

The flaw exists in the 8250_mxpcie serial driver of the Linux kernel; any kernel that compiles this driver or loads it as a module is vulnerable, regardless of distribution or release version. All builds prior to the patched revision are affected.

Risk and Exploitability

The CVSS score and EPSS are not publicly disclosed, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector requires local privileged or physical access to supply a malformed PCIe serial device or otherwise force a registration failure. If an attacker can trigger the faulty removal path, the kernel crash will manifest. No public exploitation reports are known, but the severity of a kernel panic makes this a high‑risk flaw when an exploit is achieved.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Remove or disable the 8250_mxpcie driver from the kernel configuration or prevent its module from loading when the serial port functionality is not required
  • Apply vendor‑provided kernel updates or backport patches that record and unregister only the ports that were successfully registered
  • Continuously monitor system logs for serial8250 crashes or out‑of‑bounds access warnings and respond with a reboot or driver reload when necessary

Generated by OpenCVE AI on December 1, 2026 at 04:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-124
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.1, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-119
CWE-129
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: serial: 8250_mxpcie: only unregister the ports that were registered When serial8250_register_8250_port() fails the loop stops and the probe keeps the ports registered so far, like pciserial_init_ports() in 8250_pci.c this driver was split from. What the split lost is that function's priv->nr: mxpcie8250_remove() walks all num_ports entries, but the ones the loop never reached keep the zero devm_kzalloc() left there, and the one that failed keeps a negative error code. serial8250_unregister_port() checks neither, so removal unregisters line 0 - a port this driver does not own - and indexes serial8250_ports[] with a negative line number. Record how many ports were registered and unregister only those.
Title serial: 8250_mxpcie: only unregister the ports that were registered
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-124

    Buffer Underwrite ('Buffer Underflow')

  • CWE-129

    Improper Validation of Array Index

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:36 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:36 PM