cbcvebase.
CVE-2022-50568
published 2025-10-22

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…

PriorityP421
EPSS
0.21%
10.6th percentile
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.

Affected

19 ranges
VendorProductVersion rangeFixed in
debianlinux< linux 6.1.4-1 (bookworm)linux 6.1.4-1 (bookworm)
linuxlinux
linuxlinux>= 71adf118946957839a13aa4d1094183e05c6c094 < 1cd7f156f6389918f760687fbbf133c86da931621cd7f156f6389918f760687fbbf133c86da93162
linuxlinux>= 71adf118946957839a13aa4d1094183e05c6c094 < c78c87c4e389b62f8892af7f59857447aa6d9797c78c87c4e389b62f8892af7f59857447aa6d9797
linuxlinux>= 71adf118946957839a13aa4d1094183e05c6c094 < 1b6a53e447ec3d81623610c8c7ec5082b47dfdce1b6a53e447ec3d81623610c8c7ec5082b47dfdce
linuxlinux>= 71adf118946957839a13aa4d1094183e05c6c094 < d3136b79705c2e3bba9c76adc5628af0215d798ed3136b79705c2e3bba9c76adc5628af0215d798e
linuxlinux>= 71adf118946957839a13aa4d1094183e05c6c094 < 9e4b85d815b14bd4db2deea2a54264a23de8b8969e4b85d815b14bd4db2deea2a54264a23de8b896
linuxlinux>= 71adf118946957839a13aa4d1094183e05c6c094 < 9e08b7f5fa00e9d550851352bd0d1ba74ccffef29e08b7f5fa00e9d550851352bd0d1ba74ccffef2
linuxlinux>= 71adf118946957839a13aa4d1094183e05c6c094 < 89ff3dfac604614287ad5aad9370c3f984ea3f4b89ff3dfac604614287ad5aad9370c3f984ea3f4b
linuxlinux_kernel>= 0 < 5.10.178-15.10.178-1
linuxlinux_kernel>= 0 < 6.1.4-16.1.4-1
linuxlinux_kernel>= 0 < 6.1.4-16.1.4-1
linuxlinux_kernel>= 0 < 6.1.4-16.1.4-1
linuxlinux_kernel>= 2.6.35 < 4.19.2704.19.270
linuxlinux_kernel>= 4.20.0 < 5.4.2295.4.229
linuxlinux_kernel>= 5.11.0 < 5.15.865.15.86
linuxlinux_kernel>= 5.16.0 < 6.0.166.0.16
linuxlinux_kernel>= 5.5.0 < 5.10.1635.10.163
linuxlinux_kernel>= 6.1.0 < 6.1.26.1.2
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.