{"id":"CVE-2026-139640","aliases":["CVE-2026-139640"],"related":[],"kind":"vulnerability","state":"published","title":"serial: 8250_mxpcie: set the driver data before registering ports","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: 8250_mxpcie: set the driver data before registering ports\n\nmxpcie8250_rs485_config() looks the board up with dev_get_drvdata() on\nthe PCI device, but pci_set_drvdata() only runs after the registration\nloop.  Where mxpcie8250_setup_port() presets rs485.flags to\nSER_RS485_ENABLED and the flag survives uart_get_rs485_mode() - the\ndevice has no firmware node, or its node sets\nlinux,rs485-enabled-at-boot-time - uart_configure_port() calls\n->rs485_config() from inside serial8250_register_8250_port(), and the\ncallback dereferences a NULL board pointer.\n\nPublish the driver data before the first port is registered.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: 8250_mxpcie: set the driver data before registering ports\n\nmxpcie8250_rs485_config() looks the board up with dev_get_drvdata() on\nthe PCI device, but pci_set_drvdata() only runs after the registration\nloop.  Where mxpcie8250_setup_port() presets rs485.flags to\nSER_RS485_ENABLED and the flag survives uart_get_rs485_mode() - the\ndevice has no firmware node, or its node sets\nlinux,rs485-enabled-at-boot-time - uart_configure_port() calls\n->rs485_config() from inside serial8250_register_8250_port(), and the\ncallback dereferences a NULL board pointer.\n\nPublish the driver data before the first port is registered.","source":"cvelist"}],"published":"2026-11-30T13:36:37.004Z","modified":"2026-11-30T14:19:47.363Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"d21a1509c62386200c09ed102983b8d79a1b0485","fixed":"0f040e2f8a186e008517c7f952de71422b78b607","status":"affected"},{"type":"git","introduced":"d21a1509c62386200c09ed102983b8d79a1b0485","fixed":"27ca9a81485f179aac83d25fcc3234bc927fa17a","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"7.3","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.3","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/0f040e2f8a186e008517c7f952de71422b78b607","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/27ca9a81485f179aac83d25fcc3234bc927fa17a","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139640","url":"https://www.cve.org/CVERecord?id=CVE-2026-139640","licence":"CVE Terms of Use","modified":"2026-11-30T13:36:37.004Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139640","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139640","licence":"Public domain","modified":"2026-11-30T14:19:47.363Z"}],"updatedAt":"2026-11-30T14:33:10.903Z","epss":{"score":0.00189,"percentile":0.08956,"date":"2026-12-01T12:00:22.000Z"}}