{"id":"DEBIAN-CVE-2022-50568","details":"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):  \tgadget-hid \texec 3\u003c\u003e /dev/hidg0 \tgadget-vid-pid-remove \texec 3\u003c&-  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.","modified":"2026-09-01T16:05:35.721761272Z","published":"2025-10-22T14:15:41.657Z","upstream":["CVE-2022-50568"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2022-50568"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:12","purl":"pkg:deb/debian/linux?arch=source&distro=bookworm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.4-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-50568.json"}},{"package":{"name":"linux","ecosystem":"Debian:13","purl":"pkg:deb/debian/linux?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.4-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-50568.json"}},{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.4-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2022-50568.json"}}],"schema_version":"1.9.0"}