Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2022-50457— mtd: core: Fix refcount error in del_mtd_device()

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于del_mtd_device函数中设备节点引用计数处理不当,可能导致内存泄漏。

AI Predicted 5.5 Difficulty: Moderate EPSS 0.16% · P4

Possible ATT&CK Techniques 1 AI

T1499 · Endpoint Denial of Service

Affected Version Matrix 8

VendorProduct Version RangeStatus
Linux Linux 00596576a05145a1b5672897a82ef87af00becf4< f6016557f1ef7735963bd8691592d2797bbf91d2 affected
00596576a05145a1b5672897a82ef87af00becf4< 616dc895d982026f41f500c88d1bfea004938cc8 affected
00596576a05145a1b5672897a82ef87af00becf4< 56570bdad5e31c5c538cd6efff5c4510256e1bb4 affected
5.17 affected
< 5.17 unaffected
6.0.16≤ 6.0.* unaffected
6.1.2≤ 6.1.* unaffected
6.2≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2022-50457

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
mtd: core: Fix refcount error in del_mtd_device()
Source: CVE Program / CVE List V5
Vulnerability 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 cleared, can't locate of_node # of_node_put(NULL) won't do anything Fix the error by caching the pointer of the device_node. OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /spi/spi-sram@0 CPU: 3 PID: 275 Comm: python3 Tainted: G N 6.1.0-rc3+ #54 0d8a1edddf51f172ff5226989a7565c6313b08e2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x67/0x83 kobject_get+0x155/0x160 of_node_get+0x1f/0x30 of_fwnode_get+0x43/0x70 fwnode_handle_get+0x54/0x80 fwnode_get_nth_parent+0xc9/0xe0 fwnode_full_name_string+0x3f/0xa0 device_node_string+0x30f/0x750 pointer+0x598/0x7a0 vsnprintf+0x62d/0x9b0 ... cfs_overlay_release+0x30/0x90 config_item_release+0xbe/0x1a0 config_item_put+0x5e/0x80 configfs_rmdir+0x3bd/0x540 vfs_rmdir+0x18c/0x320 do_rmdir+0x198/0x330 __x64_sys_rmdir+0x2c/0x40 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd [<miquel.raynal@bootlin.com>: Light reword of the commit log]
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于del_mtd_device函数中设备节点引用计数处理不当,可能导致内存泄漏。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 00596576a05145a1b5672897a82ef87af00becf4 ~ f6016557f1ef7735963bd8691592d2797bbf91d2 -
Linux Linux 5.17 -

II. Public POCs for CVE-2022-50457

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2022-50457

请登录查看更多情报信息。

Same Patch Batch · Linux · 2025-10-01 · 169 CVEs total

CVE-2023-53517 9.8 CRITICAL tipc: do not update mtu if msg_max is too small in mtu negotiation
CVE-2023-53454 8.8 HIGH HID: multitouch: Correct devm device reference for hidinput input_dev name
CVE-2025-39918 8.8 HIGH wifi: mt76: fix linked list corruption
CVE-2025-39919 8.8 HIGH wifi: mt76: mt7996: add missing check for rx wcid entries
CVE-2022-50442 8.4 HIGH fs/ntfs3: Validate buffer length while parsing index
CVE-2023-53493 8.4 HIGH accel/qaic: tighten bounds checking in decode_message()
CVE-2022-50421 7.8 HIGH rpmsg: char: Avoid double destroy of default endpoint
CVE-2023-53484 7.8 HIGH lib: cpu_rmap: Avoid use after free on rmap->obj array entries
CVE-2022-50440 7.8 HIGH drm/vmwgfx: Validate the box size for the snooped cursor
CVE-2023-53465 7.8 HIGH soundwire: qcom: fix storing port config out-of-bounds
CVE-2025-39924 7.8 HIGH erofs: fix invalid algorithm for encoded extents
CVE-2023-53510 7.8 HIGH scsi: ufs: core: Fix handling of lrbp->cmd
CVE-2022-50454 7.8 HIGH drm/nouveau: fix a use-after-free in nouveau_gem_prime_import_sg_table()
CVE-2025-39927 7.8 HIGH ceph: fix race condition validating r_parent before applying state
CVE-2023-53506 7.8 HIGH udf: Do not bother merging very long extents
CVE-2022-50437 7.8 HIGH drm/msm/hdmi: fix memory corruption with too many bridges
CVE-2023-53495 7.8 HIGH net: ethernet: mvpp2_main: fix possible OOB write in mvpp2_ethtool_get_rxnfc()
CVE-2023-53494 7.8 HIGH crypto: xts - Handle EBUSY correctly
CVE-2022-50432 7.8 HIGH kernfs: fix use-after-free in __kernfs_remove
CVE-2023-53492 7.8 HIGH netfilter: nf_tables: do not ignore genmask when looking up chain by id

Showing top 20 of 169 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2022-50457

No comments yet


Leave a comment