CVE-2022-50568: usb: gadget: f_hid: fix f_hidg lifetime vs cdev

Deferred
AliasesUBUNTU-CVE-2022-50568DEBIAN-CVE-2022-50568
Published 22-10-2025Last modified 11-05-2026

Vulnerability summary

CVE-2022-50568 is a vulnerability in linux with no CVSS score yet. EPSS estimates a 0.22% chance of exploitation in the next 30 days, higher than 12.5% of scored vulnerabilities.

Priority
Insufficient evidence

No CVSS vector published; no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
Not scored
010
No CVSS score recorded
EPSS score
0.22%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 4 · Related 4

Timeline

  1. 22-10-2025
    PublishedVulnerability first disclosed.
  2. 11-05-2026
    Last modifiedVulnerability information updated.

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.

CVSS metrics

Risk metrics not yet published.

EPSS trend

Probability

0.22%

Chance of exploitation in the next 30 days

Percentile

13%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.22% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

No weakness data has been published for this record.

Affected systems

Version check

Known conditions: not stated in public data.

Ubuntu119 products
  • linuxAll versions (No fix recorded) | < 5.4.0-144.161 | < 5.15.0-69.76
  • linux-allwinner-5.19All versions (No fix recorded)
  • linux-awsAll versions (No fix recorded) | < 5.4.0-1097.105 | < 5.15.0-1033.37
  • linux-aws-5.0All versions (No fix recorded)
  • linux-aws-5.11All versions (No fix recorded)
Debian1 product
  • linux< 6.1.4-1
Linux1 product
  • linux≥ 71adf118946957839a13aa4d1094183e05c6c094, < 1cd7f156f6389918f760687fbbf133c86da93162 | ≥ 71adf118946957839a13aa4d1094183e05c6c094, < c78c87c4e389b62f8892af7f59857447aa6d9797 | ≥ 71adf118946957839a13aa4d1094183e05c6c094, < 1b6a53e447ec3d81623610c8c7ec5082b47dfdce | ≥ 71adf118946957839a13aa4d1094183e05c6c094, < d3136b79705c2e3bba9c76adc5628af0215d798e | ≥ 71adf118946957839a13aa4d1094183e05c6c094, < 9e4b85d815b14bd4db2deea2a54264a23de8b896 | ≥ 71adf118946957839a13aa4d1094183e05c6c094, < 9e08b7f5fa00e9d550851352bd0d1ba74ccffef2 | ≥ 71adf118946957839a13aa4d1094183e05c6c094, < 89ff3dfac604614287ad5aad9370c3f984ea3f4b | 2.6.35

3 vendors · 121 products

References

11 links
Show all 11 references