Menu

Star on GitHub · 3.2k

CVE-2022-50568

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_hid: fix f_hidg lifetime vs cdev The embedded struct cdev does not have its lifetime correctly tied to the enclo…

Published Oct 22, 2025EPSS 0.22%

Overview

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

Technical description

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

usb: gadget: f_hid: fix f_hidg lifetime vs cdev

The embedded struct cdev does not have its lifetime correctly tied to

the enclosing struct f_hidg, so there is a use-after-free if /dev/hidgN

is held open while the gadget is deleted.

This can readily be replicated with libusbgx's example programs (for

conciseness - operating directly via configfs is equivalent):

gadget-hid

exec 3<> /dev/hidg0

gadget-vid-pid-remove

exec 3<&-

Pull the existing device up in to struct f_hidg and make use of the

cdev_device_{add,del}() helpers. This changes the lifetime of the

device object to match struct f_hidg, but note that it is still added

and deleted at the same time.

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

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

How severe is CVE-2022-50568?

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

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

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