Menu

Star on GitHub · 3.2k

CVE-2022-50304

5.5 · MEDIUM

In the Linux kernel, the following vulnerability has been resolved: mtd: core: fix possible resource leak in init_mtd() I got the error report while inject fault in init_mtd(): sysfs: cannot cre…

Published Sep 15, 2025CWE-401EPSS 0.16%

Overview

CVE-2022-50304 is a medium-severity vulnerability. It was published on September 15, 2025 and has a CVSS 3.1 base score of 5.5 (MEDIUM).

This vulnerability has a CVSS 3.1 base score of 5.5, rated MEDIUM. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

Technical description

In the Linux kernel, the following vulnerability has been resolved:

mtd: core: fix possible resource leak in init_mtd()

I got the error report while inject fault in init_mtd():

sysfs: cannot create duplicate filename '/devices/virtual/bdi/mtd-0'

Call Trace:

<TASK>

dump_stack_lvl+0x67/0x83

sysfs_warn_dup+0x60/0x70

sysfs_create_dir_ns+0x109/0x120

kobject_add_internal+0xce/0x2f0

kobject_add+0x98/0x110

device_add+0x179/0xc00

device_create_groups_vargs+0xf4/0x100

device_create+0x7b/0xb0

bdi_register_va.part.13+0x58/0x2d0

bdi_register+0x9b/0xb0

init_mtd+0x62/0x171 [mtd]

do_one_initcall+0x6c/0x3c0

do_init_module+0x58/0x222

load_module+0x268e/0x27d0

__do_sys_finit_module+0xd5/0x140

do_syscall_64+0x37/0x90

entry_SYSCALL_64_after_hwframe+0x63/0xcd

</TASK>

kobject_add_internal failed for mtd-0 with -EEXIST, don't try to register

things with the same name in the same directory.

Error registering mtd class or bdi: -17

If init_mtdchar() fails in init_mtd(), mtd_bdi will not b

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2022-50304?

CVE-2022-50304 is a medium-severity vulnerability. It was published on September 15, 2025 and has a CVSS 3.1 base score of 5.5 (MEDIUM).

How severe is CVE-2022-50304?

This vulnerability has a CVSS 3.1 base score of 5.5, rated MEDIUM. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2022-50304?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2022-50304?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2022-50304 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.

Related MEDIUM CVEs from 2022

View all