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 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):
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.
Detalles técnicos trazas, registros y código del informe original
gadget-hid exec 3<> /dev/hidg0 gadget-vid-pid-remove exec 3<&-
CVSS
NVD no ha asignado puntuación CVSS a esta CVE (habitual desde el cambio de política de abril de 2026).
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 0.22%
- Percentil entre todas las CVEs puntuadas: 11
- Fecha de la puntuación: 5/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
Tecnologías afectadas (1)
⚠ Inferidas por IA a partir de la descripción — NVD aún no ha analizado esta CVE; no son CPE verificados.
Referencias
- 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
JSON original (NVD)
Mostrar
{
"id": "CVE-2022-50568",
"cveTags": [],
"metrics": {},
"affected": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"affectedData": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "71adf118946957839a13aa4d1094183e05c6c094",
"lessThan": "1cd7f156f6389918f760687fbbf133c86da93162",
"versionType": "git"
},
{
"status": "affected",
"version": "71adf118946957839a13aa4d1094183e05c6c094",
"lessThan": "c78c87c4e389b62f8892af7f59857447aa6d9797",
"versionType": "git"
},
{
"status": "affected",
"version": "71adf118946957839a13aa4d1094183e05c6c094",
"lessThan": "1b6a53e447ec3d81623610c8c7ec5082b47dfdce",
"versionType": "git"
},
{
"status": "affected",
"version": "71adf118946957839a13aa4d1094183e05c6c094",
"lessThan": "d3136b79705c2e3bba9c76adc5628af0215d798e",
"versionType": "git"
},
{
"status": "affected",
"version": "71adf118946957839a13aa4d1094183e05c6c094",
"lessThan": "9e4b85d815b14bd4db2deea2a54264a23de8b896",
"versionType": "git"
},
{
"status": "affected",
"version": "71adf118946957839a13aa4d1094183e05c6c094",
"lessThan": "9e08b7f5fa00e9d550851352bd0d1ba74ccffef2",
"versionType": "git"
},
{
"status": "affected",
"version": "71adf118946957839a13aa4d1094183e05c6c094",
"lessThan": "89ff3dfac604614287ad5aad9370c3f984ea3f4b",
"versionType": "git"
}
],
"programFiles": [
"drivers/usb/gadget/function/f_hid.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "2.6.35"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "2.6.35",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "4.19.270",
"versionType": "semver",
"lessThanOrEqual": "4.19.*"
},
{
"status": "unaffected",
"version": "5.4.229",
"versionType": "semver",
"lessThanOrEqual": "5.4.*"
},
{
"status": "unaffected",
"version": "5.10.163",
"versionType": "semver",
"lessThanOrEqual": "5.10.*"
},
{
"status": "unaffected",
"version": "5.15.86",
"versionType": "semver",
"lessThanOrEqual": "5.15.*"
},
{
"status": "unaffected",
"version": "6.0.16",
"versionType": "semver",
"lessThanOrEqual": "6.0.*"
},
{
"status": "unaffected",
"version": "6.1.2",
"versionType": "semver",
"lessThanOrEqual": "6.1.*"
},
{
"status": "unaffected",
"version": "6.2",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"drivers/usb/gadget/function/f_hid.c"
],
"defaultStatus": "affected"
}
]
}
],
"published": "2025-10-22T14:15:41.657",
"references": [
{
"url": "https://git.kernel.org/stable/c/1b6a53e447ec3d81623610c8c7ec5082b47dfdce",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/1cd7f156f6389918f760687fbbf133c86da93162",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/89ff3dfac604614287ad5aad9370c3f984ea3f4b",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/9e08b7f5fa00e9d550851352bd0d1ba74ccffef2",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/9e4b85d815b14bd4db2deea2a54264a23de8b896",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/c78c87c4e389b62f8892af7f59857447aa6d9797",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/d3136b79705c2e3bba9c76adc5628af0215d798e",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
],
"vulnStatus": "Deferred",
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_hid: fix f_hidg lifetime vs cdev\n\nThe embedded struct cdev does not have its lifetime correctly tied to\nthe enclosing struct f_hidg, so there is a use-after-free if /dev/hidgN\nis held open while the gadget is deleted.\n\nThis can readily be replicated with libusbgx's example programs (for\nconciseness - operating directly via configfs is equivalent):\n\n\tgadget-hid\n\texec 3<> /dev/hidg0\n\tgadget-vid-pid-remove\n\texec 3<&-\n\nPull the existing device up in to struct f_hidg and make use of the\ncdev_device_{add,del}() helpers. This changes the lifetime of the\ndevice object to match struct f_hidg, but note that it is still added\nand deleted at the same time."
}
],
"lastModified": "2026-06-17T05:23:48.470",
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}