CVE-2022-50457Improper Update of Reference Count in Linux

Severity
5.5MEDIUMNVD
EPSS
0.0%
top 98.22%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedOct 1

Description

In the Linux kernel, the following vulnerability has been resolved: mtd: core: Fix refcount error in del_mtd_device() del_mtd_device() will call of_node_put() to mtd_get_of_node(mtd), which is mtd->dev.of_node. However, memset(&mtd->dev, 0) is called before of_node_put(). As the result, of_node_put() won't do anything in del_mtd_device(), and causes the refcount leak. del_mtd_device() memset(&mtd->dev, 0, sizeof(mtd->dev) # clear mtd->dev of_node_put() mtd_get_of_node(mtd) # mtd->dev is clear

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HExploitability: 1.8 | Impact: 3.6

Affected Packages4 packages

NVDlinux/linux_kernel5.176.0.16+1
Debianlinux/linux_kernel< 6.1.4-1+2
CVEListV5linux/linux00596576a05145a1b5672897a82ef87af00becf4f6016557f1ef7735963bd8691592d2797bbf91d2+3
debiandebian/linux< linux 6.1.4-1 (bookworm)

Patches

🔴Vulnerability Details

2
GHSA
GHSA-j49h-xgx7-8459: In the Linux kernel, the following vulnerability has been resolved: mtd: core: Fix refcount error in del_mtd_device() del_mtd_device() will call of_2025-10-01
OSV
CVE-2022-50457: In the Linux kernel, the following vulnerability has been resolved: mtd: core: Fix refcount error in del_mtd_device() del_mtd_device() will call of_no2025-10-01

📋Vendor Advisories

2
Red Hat
kernel: mtd: core: Fix refcount error in del_mtd_device()2025-10-01
Debian
CVE-2022-50457: linux - In the Linux kernel, the following vulnerability has been resolved: mtd: core: ...2022