{"id":"CVE-2026-139640","summary":"serial: 8250_mxpcie: set the driver data before registering ports","details":"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-\u003ers485_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.","modified":"2026-12-01T21:02:34.565815177Z","published":"2026-11-30T13:36:37.004Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139640.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0f040e2f8a186e008517c7f952de71422b78b607"},{"type":"WEB","url":"https://git.kernel.org/stable/c/27ca9a81485f179aac83d25fcc3234bc927fa17a"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139640.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139640"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"d21a1509c62386200c09ed102983b8d79a1b0485"},{"fixed":"0f040e2f8a186e008517c7f952de71422b78b607"},{"fixed":"27ca9a81485f179aac83d25fcc3234bc927fa17a"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139640.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.3.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139640.json"}}],"schema_version":"1.9.2"}