{"id":"CVE-2026-143001","state":"PUBLISHED","title":"serial: 8250_exar: check priv->gpio properly","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: 8250_exar: check priv->gpio properly\n\npriv->gpio is set by platform_device_register_full(), which returns\nerror-encoded pointers on failure, not NULL. Sashiko reported:\n\n> Does __xr17v35x_register_gpio() return an ERR_PTR if\n> platform_device_register_full() fails?\n>\n> If it does, we might be storing an error pointer directly into\n> priv->gpio in xr17v35x_register_gpio() without validating it with\n> IS_ERR(). Because the error is ignored, the device probe\n> successfully continues.\n\nBefore commit 1145d1a0703f (\"serial: 8250_exar: use\nplatform_device_register_full()\"), __xr17v35x_register_gpio()\nreturned NULL on any failure (platform_device_alloc(),\ndevice_add_software_node() or platform_device_add() failing were all\nturned into a NULL return). The plain truthy check in\nxr17v35x_unregister_gpio() matched that convention. That commit\nswitched registration to platform_device_register_full(), which\nreports failure as an ERR_PTR() instead of NULL, but the unregister\ncheck was never updated to match. As a result, a failed registration\nleft an error pointer in priv->gpio, and unbind would tear it down as\nif it were a real platform_device, dereferencing the encoded error\nvalue in device_remove_software_node() and\nplatform_device_unregister().\n\nUse IS_ERR_OR_NULL() instead, so both the unset (non-EXAR vendor,\npriv->gpio never assigned) and failed-registration (ERR_PTR) cases\nare skipped.","publishedAt":"2026-12-03T09:17:33.925Z","updatedAt":"2026-12-03T09:17:33.925Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1145d1a0703f44687e599f8608c035cea95e6ae3","status":"affected","lessThan":"07de184d9bf160efeb183e219172c39b99678c16","versionType":"git"},{"version":"1145d1a0703f44687e599f8608c035cea95e6ae3","status":"affected","lessThan":"0353b51965883cf70dad162908e07395f242000f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/tty/serial/8250/8250_exar.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.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc4","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_exar.c"]}],"references":["https://git.kernel.org/stable/c/07de184d9bf160efeb183e219172c39b99678c16","https://git.kernel.org/stable/c/0353b51965883cf70dad162908e07395f242000f"],"weaknesses":[],"ingestedAt":"2026-12-03T09:26:06.073Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143001.json","commit":"9fd484e43f2e14021809e195d28c1172759faad0","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143001","state":"PUBLISHED","datePublished":"2026-12-03T09:17:33.925Z","dateUpdated":"2026-12-03T09:17:33.925Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.342Z"},"containers":{"cna":{"title":"serial: 8250_exar: check priv->gpio properly","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nserial: 8250_exar: check priv->gpio properly\n\npriv->gpio is set by platform_device_register_full(), which returns\nerror-encoded pointers on failure, not NULL. Sashiko reported:\n\n> Does __xr17v35x_register_gpio() return an ERR_PTR if\n> platform_device_register_full() fails?\n>\n> If it does, we might be storing an error pointer directly into\n> priv->gpio in xr17v35x_register_gpio() without validating it with\n> IS_ERR(). Because the error is ignored, the device probe\n> successfully continues.\n\nBefore commit 1145d1a0703f (\"serial: 8250_exar: use\nplatform_device_register_full()\"), __xr17v35x_register_gpio()\nreturned NULL on any failure (platform_device_alloc(),\ndevice_add_software_node() or platform_device_add() failing were all\nturned into a NULL return). The plain truthy check in\nxr17v35x_unregister_gpio() matched that convention. That commit\nswitched registration to platform_device_register_full(), which\nreports failure as an ERR_PTR() instead of NULL, but the unregister\ncheck was never updated to match. As a result, a failed registration\nleft an error pointer in priv->gpio, and unbind would tear it down as\nif it were a real platform_device, dereferencing the encoded error\nvalue in device_remove_software_node() and\nplatform_device_unregister().\n\nUse IS_ERR_OR_NULL() instead, so both the unset (non-EXAR vendor,\npriv->gpio never assigned) and failed-registration (ERR_PTR) cases\nare skipped."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1145d1a0703f44687e599f8608c035cea95e6ae3","status":"affected","lessThan":"07de184d9bf160efeb183e219172c39b99678c16","versionType":"git"},{"version":"1145d1a0703f44687e599f8608c035cea95e6ae3","status":"affected","lessThan":"0353b51965883cf70dad162908e07395f242000f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/tty/serial/8250/8250_exar.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.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc4","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_exar.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/07de184d9bf160efeb183e219172c39b99678c16"},{"url":"https://git.kernel.org/stable/c/0353b51965883cf70dad162908e07395f242000f"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:17:33.925Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.3","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.3","versionEndExcluding":"7.4-rc4"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}