Skip to content
Heist/ feed
Back to feed
UnratedFix available

spi: Fix simplification of devm_spi_register_controller

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: spi: Fix simplification of devm_spi_register_controller This reverts commit 59ebbe40fb51 ("spi: simplify devm_spi_register_controller"). If devm_add_action() fails in devm_add_action_or_reset(), devm_spi_unregister() will be called, it decreases the refcount of 'ctlr->dev' to 0, then it will cause uaf in the drivers that calling spi_put_controller() in error path.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.15.61, 5.18.18, 5.19.2
CVEs
CVE-2022-50190
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 19:53 UTC · Revision 1

Source evidence

spi: Fix simplification of devm_spi_register_controller

core-osv · Original source

Published 18 Jun 2025, 11:03 UTC

In the Linux kernel, the following vulnerability has been resolved: spi: Fix simplification of devm_spi_register_controller This reverts commit 59ebbe40fb51 ("spi: simplify devm_spi_register_controller"). If devm_add_action() fails in devm_add_action_or_reset(), devm_spi_unregister() will be called, it decreases the refcount of 'ctlr->dev' to 0, then it will cause uaf in the drivers that calling spi_put_controller() in error path.

osv:CVE-2022-50190

Kernel

Fixed versions: 5.15.61, 5.18.18, 5.19.2

Complete source record
{
  "id": "b15ee281752e8de5eee2087fd0195943f879996fd48de70ed7aa54ece3d006ae",
  "url": "https://osv.dev/vulnerability/CVE-2022-50190",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "spi: Fix simplification of devm_spi_register_controller",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: spi: Fix simplification of devm_spi_register_controller This reverts commit 59ebbe40fb51 (\"spi: simplify devm_spi_register_controller\"). If devm_add_action() fails in devm_add_action_or_reset(), devm_spi_unregister() will be called, it decreases the refcount of 'ctlr->dev' to 0, then it will cause uaf in the drivers that calling spi_put_controller() in error path.",
    "evidence": "osv:CVE-2022-50190",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.15.61",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.18.18",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.19.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-50190",
      "aliases": [
        "CVE-2022-50190"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "59ebbe40fb51e307032ae7f63b2749fad2d4635a"
                },
                {
                  "fixed": "445fb9c19cf45bd9472fd9babaa31c5e6c7d2720"
                },
                {
                  "fixed": "34bab623ebfc08398499e463396b81abb4abe01e"
                },
                {
                  "fixed": "3c6bd448442b6c3f6843ac70d57201a13478dd47"
                },
                {
                  "fixed": "43cc5a0afe4184a7fafe1eba32b5a11bb69c9ce0"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50190.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.13.0"
                },
                {
                  "fixed": "5.15.61"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "5.18.18"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.19.0"
                },
                {
                  "fixed": "5.19.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50190.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.970860099Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/34bab623ebfc08398499e463396b81abb4abe01e",
        "https://git.kernel.org/stable/c/3c6bd448442b6c3f6843ac70d57201a13478dd47",
        "https://git.kernel.org/stable/c/43cc5a0afe4184a7fafe1eba32b5a11bb69c9ce0",
        "https://git.kernel.org/stable/c/445fb9c19cf45bd9472fd9babaa31c5e6c7d2720",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50190.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-50190",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50190.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-50190",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 498836,
  "published_at": "2025-06-18T11:03:36.32+00:00"
}