Menu

Star on GitHub · 3.2k

CVE-2022-50578

In the Linux kernel, the following vulnerability has been resolved: class: fix possible memory leak in __class_register() If class_add_groups() returns error, the 'cp->subsys' need be unregister,…

Published Oct 22, 2025EPSS 0.24%

Overview

CVE-2022-50578 is a known-severity vulnerability. It was published on October 22, 2025.

Technical description

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

class: fix possible memory leak in __class_register()

If class_add_groups() returns error, the 'cp->subsys' need be

unregister, and the 'cp' need be freed.

We can not call kset_unregister() here, because the 'cls' will

be freed in callback function class_release() and it's also

freed in caller's error path, it will cause double free.

So fix this by calling kobject_del() and kfree_const(name) to

cleanup kobject. Besides, call kfree() to free the 'cp'.

Fault injection test can trigger this:

unreferenced object 0xffff888102fa8190 (size 8):

comm "modprobe", pid 502, jiffies 4294906074 (age 49.296s)

hex dump (first 8 bytes):

70 6b 74 63 64 76 64 00 pktcdvd.

backtrace:

[<00000000e7c7703d>] __kmalloc_track_caller+0x1ae/0x320

[<000000005e4d70bc>] kstrdup+0x3a/0x70

[<00000000c2e5e85a>] kstrdup_const+0x68/0x80

[<000000000049a8c7>] kvasprintf_const+0x10b/0x190

[<0000000

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-50578?

CVE-2022-50578 is a known-severity vulnerability. It was published on October 22, 2025.

How severe is CVE-2022-50578?

CVSS score information is not yet available for this vulnerability. Check back as the CVE record is updated by NVD analysts.

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

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-50578?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2022-50578 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.