{"api_version":"1","generated_at":"2026-12-01T13:43:07+00:00","cve":"CVE-2026-138819","urls":{"html":"https://cve.report/CVE-2026-138819","api":"https://cve.report/api/cve/CVE-2026-138819.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-138819","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-138819"},"summary":{"title":"serial: 8250_exar: store the GPIO platform device in struct exar8250","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: 8250_exar: store the GPIO platform device in struct exar8250\n\nThe GPIO platform device is registered via platform->register_gpio()\nwhen port 0 is being set up. It is stored to port->port.private_data of\nthe on-stack uart template (and from there it is copied into every\nregistered port). pci_xr17v35x_exit() then fetches it back by\nserial8250_get_port(priv->line[0]).\n\nBut port 0 does not have to exist at that point. If\nserial8250_register_8250_port() fails for port 0, priv->line[0] holds a\nnegative error code. The probe still succeeds (it only breaks the loop),\nso on unbind, priv->line[0] (a negative value) is passed to\nserial8250_get_port(). The GPIO device is never unregistered and a\nbogus port is accessed.\n\nThe same problem would also occur after the planned conversion of\nserial8250_register_8250_port() to return a uart port instead of a\nline. As Sashiko pointed out in that case:\n  If board->setup() fails for the first port (i=0) in exar_pci_probe(),\n  priv->uport[0] remains NULL. If serial8250_register_8250_port() fails,\n  it returns an ERR_PTR. In either case, the loop breaks and probe\n  returns success. When the device is later unbound,\n  pci_xr17v35x_exit() unconditionally passes priv->uport[0] to\n  platform->unregister_gpio(), which will dereference it without\n  checking for validity.\n\nThe GPIO device belongs to the PCI device, not to any particular port.\nSo store it in a new struct exar8250::gpio member. Pass priv to both\n->register_gpio() and ->unregister_gpio(), so that pci_xr17v35x_exit()\ndoes not need to look up any port at all.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:35","updated_at":"2026-11-30 14:17:35"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/55265c0f41ebe877b00b09a3d0cda796e6737e03","name":"https://git.kernel.org/stable/c/55265c0f41ebe877b00b09a3d0cda796e6737e03","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/3279fe10b300a97eac23a192088491b6a99cdbd1","name":"https://git.kernel.org/stable/c/3279fe10b300a97eac23a192088491b6a99cdbd1","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/72990547fea5a865a5fb17480151826e9554d650","name":"https://git.kernel.org/stable/c/72990547fea5a865a5fb17480151826e9554d650","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/3a59d55604f47c48f069225a8bebedcb2b2a20d8","name":"https://git.kernel.org/stable/c/3a59d55604f47c48f069225a8bebedcb2b2a20d8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/c16555815d4b7aae2b2b2aa2ea320c714d0fee6d","name":"https://git.kernel.org/stable/c/c16555815d4b7aae2b2b2aa2ea320c714d0fee6d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/68825efacafc23872eb346b0c9caaae9f23e4669","name":"https://git.kernel.org/stable/c/68825efacafc23872eb346b0c9caaae9f23e4669","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9eb168ad47c80910016a0d0c14eba30de0647cf4","name":"https://git.kernel.org/stable/c/9eb168ad47c80910016a0d0c14eba30de0647cf4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/33d337816e00994daaf670243186d9e537ee090d","name":"https://git.kernel.org/stable/c/33d337816e00994daaf670243186d9e537ee090d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-138819","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138819","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 3a59d55604f47c48f069225a8bebedcb2b2a20d8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 72990547fea5a865a5fb17480151826e9554d650 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 68825efacafc23872eb346b0c9caaae9f23e4669 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 9eb168ad47c80910016a0d0c14eba30de0647cf4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 c16555815d4b7aae2b2b2aa2ea320c714d0fee6d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 55265c0f41ebe877b00b09a3d0cda796e6737e03 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 3279fe10b300a97eac23a192088491b6a99cdbd1 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 33d337816e00994daaf670243186d9e537ee090d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.11","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.11 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/tty/serial/8250/8250_exar.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"3a59d55604f47c48f069225a8bebedcb2b2a20d8","status":"affected","version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","versionType":"git"},{"lessThan":"72990547fea5a865a5fb17480151826e9554d650","status":"affected","version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","versionType":"git"},{"lessThan":"68825efacafc23872eb346b0c9caaae9f23e4669","status":"affected","version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","versionType":"git"},{"lessThan":"9eb168ad47c80910016a0d0c14eba30de0647cf4","status":"affected","version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","versionType":"git"},{"lessThan":"c16555815d4b7aae2b2b2aa2ea320c714d0fee6d","status":"affected","version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","versionType":"git"},{"lessThan":"55265c0f41ebe877b00b09a3d0cda796e6737e03","status":"affected","version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","versionType":"git"},{"lessThan":"3279fe10b300a97eac23a192088491b6a99cdbd1","status":"affected","version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","versionType":"git"},{"lessThan":"33d337816e00994daaf670243186d9e537ee090d","status":"affected","version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/tty/serial/8250/8250_exar.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.11"},{"lessThan":"4.11","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.63","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"4.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"4.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"4.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"4.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"4.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"4.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"4.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"4.11","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: 8250_exar: store the GPIO platform device in struct exar8250\n\nThe GPIO platform device is registered via platform->register_gpio()\nwhen port 0 is being set up. It is stored to port->port.private_data of\nthe on-stack uart template (and from there it is copied into every\nregistered port). pci_xr17v35x_exit() then fetches it back by\nserial8250_get_port(priv->line[0]).\n\nBut port 0 does not have to exist at that point. If\nserial8250_register_8250_port() fails for port 0, priv->line[0] holds a\nnegative error code. The probe still succeeds (it only breaks the loop),\nso on unbind, priv->line[0] (a negative value) is passed to\nserial8250_get_port(). The GPIO device is never unregistered and a\nbogus port is accessed.\n\nThe same problem would also occur after the planned conversion of\nserial8250_register_8250_port() to return a uart port instead of a\nline. As Sashiko pointed out in that case:\n  If board->setup() fails for the first port (i=0) in exar_pci_probe(),\n  priv->uport[0] remains NULL. If serial8250_register_8250_port() fails,\n  it returns an ERR_PTR. In either case, the loop breaks and probe\n  returns success. When the device is later unbound,\n  pci_xr17v35x_exit() unconditionally passes priv->uport[0] to\n  platform->unregister_gpio(), which will dereference it without\n  checking for validity.\n\nThe GPIO device belongs to the PCI device, not to any particular port.\nSo store it in a new struct exar8250::gpio member. Pass priv to both\n->register_gpio() and ->unregister_gpio(), so that pci_xr17v35x_exit()\ndoes not need to look up any port at all."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:25:16.809Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/3a59d55604f47c48f069225a8bebedcb2b2a20d8"},{"url":"https://git.kernel.org/stable/c/72990547fea5a865a5fb17480151826e9554d650"},{"url":"https://git.kernel.org/stable/c/68825efacafc23872eb346b0c9caaae9f23e4669"},{"url":"https://git.kernel.org/stable/c/9eb168ad47c80910016a0d0c14eba30de0647cf4"},{"url":"https://git.kernel.org/stable/c/c16555815d4b7aae2b2b2aa2ea320c714d0fee6d"},{"url":"https://git.kernel.org/stable/c/55265c0f41ebe877b00b09a3d0cda796e6737e03"},{"url":"https://git.kernel.org/stable/c/3279fe10b300a97eac23a192088491b6a99cdbd1"},{"url":"https://git.kernel.org/stable/c/33d337816e00994daaf670243186d9e537ee090d"}],"title":"serial: 8250_exar: store the GPIO platform device in struct exar8250","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-138819","datePublished":"2026-11-30T13:25:16.809Z","dateReserved":"2026-11-30T13:22:15.896Z","dateUpdated":"2026-11-30T13:25:16.809Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:35","lastModifiedDate":"2026-11-30 14:17:35","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"138819","Ordinal":"1","Title":"serial: 8250_exar: store the GPIO platform device in struct exar","CVE":"CVE-2026-138819","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"138819","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: 8250_exar: store the GPIO platform device in struct exar8250\n\nThe GPIO platform device is registered via platform->register_gpio()\nwhen port 0 is being set up. It is stored to port->port.private_data of\nthe on-stack uart template (and from there it is copied into every\nregistered port). pci_xr17v35x_exit() then fetches it back by\nserial8250_get_port(priv->line[0]).\n\nBut port 0 does not have to exist at that point. If\nserial8250_register_8250_port() fails for port 0, priv->line[0] holds a\nnegative error code. The probe still succeeds (it only breaks the loop),\nso on unbind, priv->line[0] (a negative value) is passed to\nserial8250_get_port(). The GPIO device is never unregistered and a\nbogus port is accessed.\n\nThe same problem would also occur after the planned conversion of\nserial8250_register_8250_port() to return a uart port instead of a\nline. As Sashiko pointed out in that case:\n  If board->setup() fails for the first port (i=0) in exar_pci_probe(),\n  priv->uport[0] remains NULL. If serial8250_register_8250_port() fails,\n  it returns an ERR_PTR. In either case, the loop breaks and probe\n  returns success. When the device is later unbound,\n  pci_xr17v35x_exit() unconditionally passes priv->uport[0] to\n  platform->unregister_gpio(), which will dereference it without\n  checking for validity.\n\nThe GPIO device belongs to the PCI device, not to any particular port.\nSo store it in a new struct exar8250::gpio member. Pass priv to both\n->register_gpio() and ->unregister_gpio(), so that pci_xr17v35x_exit()\ndoes not need to look up any port at all.","Type":"Description","Title":"serial: 8250_exar: store the GPIO platform device in struct exar"}]}}}