Skip to main content
Network Thinking Solutions Logo

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 enclosing struct f_hidg, so there is a use-after-free if /dev/hidgN is held open while the gadget is deleted.

All CVEs
CVE-2022-50568Published 10/22/2025

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.

Vendor advisory
CVSS—Unscored

Overview

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.

Published
10/22/2025
Last modified
6/17/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
Linux
Linux
≥ 71adf118946957839a13aa4d1094183e05c6c094, < 1cd7f156f6389918f760687fbbf133c86da93162

Verify advisory

Source
Linux
Linux
≥ 71adf118946957839a13aa4d1094183e05c6c094, < c78c87c4e389b62f8892af7f59857447aa6d9797

Verify advisory

Source
Linux
Linux
≥ 71adf118946957839a13aa4d1094183e05c6c094, < 1b6a53e447ec3d81623610c8c7ec5082b47dfdce

Verify advisory

Source
Linux
Linux
≥ 71adf118946957839a13aa4d1094183e05c6c094, < d3136b79705c2e3bba9c76adc5628af0215d798e

Verify advisory

Source
Linux
Linux
≥ 71adf118946957839a13aa4d1094183e05c6c094, < 9e4b85d815b14bd4db2deea2a54264a23de8b896

Verify advisory

Source
Linux
Linux
≥ 71adf118946957839a13aa4d1094183e05c6c094, < 9e08b7f5fa00e9d550851352bd0d1ba74ccffef2

Verify advisory

Source
Linux
Linux
≥ 71adf118946957839a13aa4d1094183e05c6c094, < 89ff3dfac604614287ad5aad9370c3f984ea3f4b

Verify advisory

Source
Linux
Linux
2.6.35

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

No CVSS score is published for this record yet. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.