CVE-2022-50568
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
22/10/2025
Last modified:
22/10/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
usb: gadget: f_hid: fix f_hidg lifetime vs cdev<br />
<br />
The embedded struct cdev does not have its lifetime correctly tied to<br />
the enclosing struct f_hidg, so there is a use-after-free if /dev/hidgN<br />
is held open while the gadget is deleted.<br />
<br />
This can readily be replicated with libusbgx&#39;s example programs (for<br />
conciseness - operating directly via configfs is equivalent):<br />
<br />
gadget-hid<br />
exec 3 /dev/hidg0<br />
gadget-vid-pid-remove<br />
exec 3
Impact
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/1b6a53e447ec3d81623610c8c7ec5082b47dfdce
- https://git.kernel.org/stable/c/1cd7f156f6389918f760687fbbf133c86da93162
- https://git.kernel.org/stable/c/89ff3dfac604614287ad5aad9370c3f984ea3f4b
- https://git.kernel.org/stable/c/9e08b7f5fa00e9d550851352bd0d1ba74ccffef2
- https://git.kernel.org/stable/c/9e4b85d815b14bd4db2deea2a54264a23de8b896
- https://git.kernel.org/stable/c/c78c87c4e389b62f8892af7f59857447aa6d9797
- https://git.kernel.org/stable/c/d3136b79705c2e3bba9c76adc5628af0215d798e



