{"id":"CVE-2026-138819","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:17:35.870","lastModified":"2026-11-30T14:17:35.870","vulnStatus":"Received","cveTags":[],"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."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/tty/serial/8250/8250_exar.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","lessThan":"3a59d55604f47c48f069225a8bebedcb2b2a20d8","versionType":"git","status":"affected"},{"version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","lessThan":"72990547fea5a865a5fb17480151826e9554d650","versionType":"git","status":"affected"},{"version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","lessThan":"68825efacafc23872eb346b0c9caaae9f23e4669","versionType":"git","status":"affected"},{"version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","lessThan":"9eb168ad47c80910016a0d0c14eba30de0647cf4","versionType":"git","status":"affected"},{"version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","lessThan":"c16555815d4b7aae2b2b2aa2ea320c714d0fee6d","versionType":"git","status":"affected"},{"version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","lessThan":"55265c0f41ebe877b00b09a3d0cda796e6737e03","versionType":"git","status":"affected"},{"version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","lessThan":"3279fe10b300a97eac23a192088491b6a99cdbd1","versionType":"git","status":"affected"},{"version":"d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2","lessThan":"33d337816e00994daaf670243186d9e537ee090d","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/tty/serial/8250/8250_exar.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"4.11","status":"affected"},{"version":"0","lessThan":"4.11","versionType":"semver","status":"unaffected"},{"version":"5.10.275","lessThanOrEqual":"5.10.*","versionType":"semver","status":"unaffected"},{"version":"5.15.226","lessThanOrEqual":"5.15.*","versionType":"semver","status":"unaffected"},{"version":"6.1.193","lessThanOrEqual":"6.1.*","versionType":"semver","status":"unaffected"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","versionType":"semver","status":"unaffected"},{"version":"6.12.117","lessThanOrEqual":"6.12.*","versionType":"semver","status":"unaffected"},{"version":"6.18.63","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{},"references":[{"url":"https://git.kernel.org/stable/c/3279fe10b300a97eac23a192088491b6a99cdbd1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/33d337816e00994daaf670243186d9e537ee090d","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/3a59d55604f47c48f069225a8bebedcb2b2a20d8","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/55265c0f41ebe877b00b09a3d0cda796e6737e03","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/68825efacafc23872eb346b0c9caaae9f23e4669","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/72990547fea5a865a5fb17480151826e9554d650","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/9eb168ad47c80910016a0d0c14eba30de0647cf4","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/c16555815d4b7aae2b2b2aa2ea320c714d0fee6d","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}