CVE-2022-50190

spi: Fix simplification of devm_spi_register_controller

HIGH
7.8
CVSS Score
Published: June 18, 2025 at 11:03 AM UTC
Updated: June 17, 2026 at 05:22 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.3%

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.13 ≤ v < 5.15.615.13 ≤ v < 5.18.185.13 ≤ v < 5.19.25.13 ≤ v < 6.05.16 ≤ v < 5.18.185.19 ≤ v < 5.19.25.1359ebbe40fb51e307032ae7f63b2749fad2d4635a
Vendor states this is fixed in 34bab623ebfc08398499e463396b81abb4abe01e (fixed)
Vendor states this is fixed in 3c6bd448442b6c3f6843ac70d57201a13478dd47 (fixed)
Vendor states this is fixed in 43cc5a0afe4184a7fafe1eba32b5a11bb69c9ce0 (fixed)
Vendor states this is fixed in 445fb9c19cf45bd9472fd9babaa31c5e6c7d2720 (fixed)
Vendor states this is fixed in 5.13 (unaffected)
Vendor states this is fixed in 5.15.61 (unaffected)
Vendor states this is fixed in 5.18.18 (unaffected)
Vendor states this is fixed in 5.19.2 (unaffected)
Vendor states this is fixed in 6.0 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/34bab623ebfc08398499e463396b81abb4abe01e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3c6bd448442b6c3f6843ac70d57201a13478dd47
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/43cc5a0afe4184a7fafe1eba32b5a11bb69c9ce0
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/445fb9c19cf45bd9472fd9babaa31c5e6c7d2720

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card