CVE-2022-50568
CVE.org · Published
- Record status
- Published
- Identifier year (not publication year)
- 2022
- Source publication
- Source updated
- Imported by cveboard
- Source snapshot
- cve_2026-10-24_midnight_baseline ·
CNA source text (English)
usb: gadget: f_hid: fix f_hidg lifetime vs cdev
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.
Scoped product and version facts
Fix information unknown; no fixed version is derived here. Missing information does not prove that no fix exists.
Exploitation unknown; this catalogue does not assess exploitation.
Linux
- Vendor
- Linux
- Product
- Linux
- Platforms
- Unknown
- Default status
unaffected
| Version (version) | Status (status) | Version scheme (versionType) | Exclusive end (lessThan) | Inclusive end (lessThanOrEqual) | Status changes (at → status) |
|---|---|---|---|---|---|
| 71adf118946957839a13aa4d1094183e05c6c094 | affected | git | 1cd7f156f6389918f760687fbbf133c86da93162 | Unavailable | None listed |
| 71adf118946957839a13aa4d1094183e05c6c094 | affected | git | c78c87c4e389b62f8892af7f59857447aa6d9797 | Unavailable | None listed |
| 71adf118946957839a13aa4d1094183e05c6c094 | affected | git | 1b6a53e447ec3d81623610c8c7ec5082b47dfdce | Unavailable | None listed |
| 71adf118946957839a13aa4d1094183e05c6c094 | affected | git | d3136b79705c2e3bba9c76adc5628af0215d798e | Unavailable | None listed |
| 71adf118946957839a13aa4d1094183e05c6c094 | affected | git | 9e4b85d815b14bd4db2deea2a54264a23de8b896 | Unavailable | None listed |
| 71adf118946957839a13aa4d1094183e05c6c094 | affected | git | 9e08b7f5fa00e9d550851352bd0d1ba74ccffef2 | Unavailable | None listed |
| 71adf118946957839a13aa4d1094183e05c6c094 | affected | git | 89ff3dfac604614287ad5aad9370c3f984ea3f4b | Unavailable | None listed |
Linux
- Vendor
- Linux
- Product
- Linux
- Platforms
- Unknown
- Default status
affected
| Version (version) | Status (status) | Version scheme (versionType) | Exclusive end (lessThan) | Inclusive end (lessThanOrEqual) | Status changes (at → status) |
|---|---|---|---|---|---|
| 2.6.35 | affected | Unavailable | Unavailable | Unavailable | None listed |
| 0 | unaffected | semver | 2.6.35 | Unavailable | None listed |
| 4.19.270 | unaffected | semver | Unavailable | 4.19.* | None listed |
| 5.4.229 | unaffected | semver | Unavailable | 5.4.* | None listed |
| 5.10.163 | unaffected | semver | Unavailable | 5.10.* | None listed |
| 5.15.86 | unaffected | semver | Unavailable | 5.15.* | None listed |
| 6.0.16 | unaffected | semver | Unavailable | 6.0.* | None listed |
| 6.1.2 | unaffected | semver | Unavailable | 6.1.* | None listed |
| 6.2 | unaffected | original_commit_for_fix | Unavailable | * | None listed |