{"id":"CVE-2026-139639","state":"PUBLISHED","title":"serial: 8250_mxpcie: only unregister the ports that were registered","description":"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.","publishedAt":"2026-11-30T13:36:36.456Z","updatedAt":"2026-11-30T13:36:36.456Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0481a041e9569dfc2448ba4c6cb30335fcb8430f","status":"affected","lessThan":"634489424217836868b6c7c379c8b1470f6f9c61","versionType":"git"},{"version":"0481a041e9569dfc2448ba4c6cb30335fcb8430f","status":"affected","lessThan":"39eaa90b6bd1dbe147c90c345796bc042080d80e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/tty/serial/8250/8250_mxpcie.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.3","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/tty/serial/8250/8250_mxpcie.c"]}],"references":["https://git.kernel.org/stable/c/634489424217836868b6c7c379c8b1470f6f9c61","https://git.kernel.org/stable/c/39eaa90b6bd1dbe147c90c345796bc042080d80e"],"weaknesses":[],"ingestedAt":"2026-11-30T13:54:04.526Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139639.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139639","state":"PUBLISHED","datePublished":"2026-11-30T13:36:36.456Z","dateUpdated":"2026-11-30T13:36:36.456Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.945Z"},"containers":{"cna":{"title":"serial: 8250_mxpcie: only unregister the ports that were registered","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0481a041e9569dfc2448ba4c6cb30335fcb8430f","status":"affected","lessThan":"634489424217836868b6c7c379c8b1470f6f9c61","versionType":"git"},{"version":"0481a041e9569dfc2448ba4c6cb30335fcb8430f","status":"affected","lessThan":"39eaa90b6bd1dbe147c90c345796bc042080d80e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/tty/serial/8250/8250_mxpcie.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.3","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/tty/serial/8250/8250_mxpcie.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/634489424217836868b6c7c379c8b1470f6f9c61"},{"url":"https://git.kernel.org/stable/c/39eaa90b6bd1dbe147c90c345796bc042080d80e"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:36:36.456Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.3","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.3","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}