CVE-2022-50161

mtd: maps: Fix refcount leak in of_flash_probe_versatile

MEDIUM
5.5
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
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: mtd: maps: Fix refcount leak in of_flash_probe_versatile of_find_matching_node_and_match() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak.

Affected

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

4.15 ≤ v < 4.19.2564.20 ≤ v < 5.4.2114.7 ≤ v < 4.14.2914.7 ≤ v < 4.19.2564.7 ≤ v < 5.10.1374.7 ≤ v < 5.15.614.7 ≤ v < 5.18.184.7 ≤ v < 5.19.24.7 ≤ v < 5.4.2114.7 ≤ v < 6.05.11 ≤ v < 5.15.615.16 ≤ v < 5.18.185.19 ≤ v < 5.19.25.5 ≤ v < 5.10.1374.7b0afd44bc192ff4c0e90a5fc1724350bcfc32b33
Vendor states this is fixed in 33ec82a6d2b119938f26e5c8040ed5d92378eb54 (fixed)
Vendor states this is fixed in 3c8de6a838b7e0eb392754ac89dd66e698684342 (fixed)
Vendor states this is fixed in 4d67c8f74d804b20febf716ec96e9a475457ec60 (fixed)
Vendor states this is fixed in 52ae2b14f76ef2d490337ddc0037bc37125be7b8 (fixed)
Vendor states this is fixed in 5d5ddd8771fa9cabeb247fba5f6ab60d63f3fbce (fixed)
Vendor states this is fixed in 79e57889aa0d92a6d769bad808fb105e7b6ea495 (fixed)
Vendor states this is fixed in 9124d51e01232a91da4034768a2a8d1688472179 (fixed)
Vendor states this is fixed in f516fbb63873ee23cba5b7c3d239677c30f13df8 (fixed)
Vendor states this is fixed in 4.14.291 (unaffected)
Vendor states this is fixed in 4.19.256 (unaffected)
Vendor states this is fixed in 4.7 (unaffected)
Vendor states this is fixed in 5.10.137 (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 5.4.211 (unaffected)
Vendor states this is fixed in 6.0 (unaffected)

References (8)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/33ec82a6d2b119938f26e5c8040ed5d92378eb54
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3c8de6a838b7e0eb392754ac89dd66e698684342
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4d67c8f74d804b20febf716ec96e9a475457ec60
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/52ae2b14f76ef2d490337ddc0037bc37125be7b8
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5d5ddd8771fa9cabeb247fba5f6ab60d63f3fbce
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/79e57889aa0d92a6d769bad808fb105e7b6ea495
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9124d51e01232a91da4034768a2a8d1688472179
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f516fbb63873ee23cba5b7c3d239677c30f13df8

CVSS

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

Quick Info

StatusANALYZED
CWE
NVD-CWE-Other

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