⚠️

Disclaimer & Liability

The content provided on this website is for educational, research, and security awareness purposes only. Any unauthorized, illegal, or abusive use of the information, tools, and techniques discussed is solely the responsibility of the user. The author and publisher assume no liability for any damages, injuries, or consequences resulting from the misuse of this content.

CVE-2026-139640: Linux 8250_mxpcie NULL-Pointer Dereference During RS-485 Port Initialization | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-139640: Linux 8250_mxpcie NULL-Pointer Dereference During RS-485 Port Initialization

Executive summary

CVE-2026-139640 addresses an initialization-order flaw in the Linux kernel serial: 8250_mxpcie driver. The driver publishes its board data only after registering its serial ports, but an RS-485 configuration callback can execute during the registration process. On systems where RS-485 is enabled at initialization, the callback may attempt to use board information that has not yet been attached, resulting in a NULL-pointer dereference.

The practical consequence is an interrupted device initialization or kernel crash. Exploitation requires an affected platform using the 8250_mxpcie driver along with a device configuration that activates the vulnerable path. The available source does not establish a remote attack vector, provide public exploitation details, or identify the kernel releases containing the fix.

Affected systems

The vulnerable component is the 8250_mxpcie module in the Linux kernel, particularly the mxpcie8250 serial driver for compatible PCI serial hardware.

The available advisory does not specify affected kernel version ranges, an upstream fix commit, or a stable or distribution release containing the correction. As a result, the exact set of vulnerable builds cannot be determined from the supplied information. Affected-system identification therefore depends on the installed kernel build, vendor advisory status, hardware configuration, and use of the 8250_mxpcie driver.

The vulnerable path may be reached when all of the following conditions align:

  • The system loads the 8250_mxpcie driver for a supported PCI serial device.

  • The device has no firmware node, or its firmware node specifies linux,rs485-enabled-at-boot-time.

  • mxpcie8250_setup_port() presets rs485.flags with SER_RS485_ENABLED, and the setting survives uart_get_rs485_mode().

  • uart_configure_port() invokes the ->rs485_config() callback during serial8250_register_8250_port().

Technical analysis

The defect is an initialization-order error rather than a flaw in the RS-485 feature itself.

mxpcie8250_rs485_config() retrieves board information from the PCI device using dev_get_drvdata(). At that point, however, pci_set_drvdata() has not yet run because the driver publishes the data only after completing its port-registration loop.

During registration, the driver can configure a port for RS-485. The enabled state may then reach uart_configure_port(), which calls the driver’s RS-485 configuration callback from inside serial8250_register_8250_port(). Because the board data is still unavailable, the callback dereferences a NULL board pointer.

The reported correction publishes the driver data before the first port is registered. This removes the ordering dependency that allows the callback to observe missing board information.

Impact and exploitability

The expected technical effect is a kernel NULL-pointer dereference during serial-device initialization. This can interrupt boot, device setup, or other kernel operations involving the affected hardware, creating a local denial-of-service condition.

The supplied intelligence does not indicate that the flaw is remotely reachable. It also does not establish that unprivileged user input alone can trigger the condition. Reliable reachability depends on the presence of compatible hardware, the relevant firmware description or absence of a firmware node, RS-485 activation, and the vulnerable kernel build.

No exploitation in the wild, public proof of concept, CISA KEV listing, CVSS score, or CVSS vector is identified in the supplied material. No network signature or dedicated indicator of compromise is provided. Accordingly, the real-world severity is assessed as low, reflecting a narrow affected surface and initialization-time crash impact without documented exploitation activity.

Mitigation

The preferred remediation is to install the vendor-provided kernel update containing the upstream correction for CVE-2026-139640. Since the supplied source does not identify the first fixed kernel release, fix status should be confirmed through current upstream and distribution advisories rather than inferred from a version number alone.

Where the driver is not operationally required, temporarily preventing the 8250_mxpcie module from loading may avoid exposure. This approach can remove needed serial functionality and should therefore be evaluated against platform requirements before it is applied. If the hardware must remain operational, relying on operational timing or restricting access before initialization completes is not a durable substitute for the upstream fix.

Detection and validation

Administrators can identify systems that load the 8250_mxpcie module or use compatible PCI serial hardware, then compare their kernel packages with vendor fix guidance for CVE-2026-139640.

Detection should focus on boot-time and device-initialization logs for NULL-pointer dereference reports involving 8250_mxpcie, mxpcie8250_rs485_config(), or serial8250_register_8250_port(). The supplied context does not include exact log strings, so matching should be validated against the relevant kernel version and platform rather than treated as a universal signature.

Expert insight

This case illustrates a subtle class of kernel-driver bugs in which a callback is invoked during resource registration, but a prerequisite association between the device and private driver state has not yet been established. The vulnerable sequence is narrow, yet kernel NULL-pointer dereferences remain operationally significant because they can turn an initialization defect into a broad service interruption on systems with the required hardware and firmware configuration.

The absence of documented exploitation and the specialized hardware dependency support a low severity assessment. That conclusion should not obscure the need for vendor-patch tracking: the fix is narrowly targeted, but systems without the relevant PCI serial hardware are unlikely to expose the path at all.

References

·
← News