{"id":"CVE-2026-139639","aliases":["CVE-2026-139639"],"related":[],"kind":"vulnerability","state":"published","title":"serial: 8250_mxpcie: only unregister the ports that were registered","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: 8250_mxpcie: only unregister the ports that were registered\n\nWhen serial8250_register_8250_port() fails the loop stops and the probe\nkeeps the ports registered so far, like pciserial_init_ports() in\n8250_pci.c this driver was split from.  What the split lost is that\nfunction's priv->nr: mxpcie8250_remove() walks all num_ports entries,\nbut the ones the loop never reached keep the zero devm_kzalloc() left\nthere, and the one that failed keeps a negative error code.\n\nserial8250_unregister_port() checks neither, so removal unregisters\nline 0 - a port this driver does not own - and indexes\nserial8250_ports[] with a negative line number.\n\nRecord how many ports were registered and unregister only those.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: 8250_mxpcie: only unregister the ports that were registered\n\nWhen serial8250_register_8250_port() fails the loop stops and the probe\nkeeps the ports registered so far, like pciserial_init_ports() in\n8250_pci.c this driver was split from.  What the split lost is that\nfunction's priv->nr: mxpcie8250_remove() walks all num_ports entries,\nbut the ones the loop never reached keep the zero devm_kzalloc() left\nthere, and the one that failed keeps a negative error code.\n\nserial8250_unregister_port() checks neither, so removal unregisters\nline 0 - a port this driver does not own - and indexes\nserial8250_ports[] with a negative line number.\n\nRecord how many ports were registered and unregister only those.","source":"cvelist"}],"published":"2026-11-30T13:36:36.456Z","modified":"2026-11-30T14:19:47.253Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"0481a041e9569dfc2448ba4c6cb30335fcb8430f","fixed":"634489424217836868b6c7c379c8b1470f6f9c61","status":"affected"},{"type":"git","introduced":"0481a041e9569dfc2448ba4c6cb30335fcb8430f","fixed":"39eaa90b6bd1dbe147c90c345796bc042080d80e","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/634489424217836868b6c7c379c8b1470f6f9c61","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/39eaa90b6bd1dbe147c90c345796bc042080d80e","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139639","url":"https://www.cve.org/CVERecord?id=CVE-2026-139639","licence":"CVE Terms of Use","modified":"2026-11-30T13:36:36.456Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139639","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139639","licence":"Public domain","modified":"2026-11-30T14:19:47.253Z"}],"updatedAt":"2026-11-30T14:33:08.561Z","epss":{"score":0.00189,"percentile":0.08957,"date":"2026-12-01T12:00:22.000Z"}}