CVE-2022-50156
In the Linux kernel, the following vulnerability has been resolved:
HID: cp2112: prevent a buffer overflow in cp2112_xfer()
Smatch warnings: drivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy() 'data->block[1]' too small (33 vs 255) drivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy() 'buf' too small (64 vs 255)
The 'read_length' variable is provided by 'data->block[0]' which comes from user and it(read_length) can take a value between 0-255. Add an upper bound to 'read_length' variable to prevent a buffer overflow in memcpy().
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Puntuación base: 7.8
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 0.22%
- Percentil entre todas las CVEs puntuadas: 12
- Fecha de la puntuación: 6/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).
🎯 Técnicas ATT&CK
Cómo se explota esta vulnerabilidad y qué consigue el atacante, en el lenguaje de MITRE ATT&CK.
- Explotación
T1068Exploitation for Privilege Escalationprivilege escalation85 % - Impacto principal
T1059Command and Scripting Interpreterexecution75 %
AV:L, PR:L sin UI permite escalada local; CWE-787 (buffer overflow) en cp2112_xfer() da ejecución de código con privilegios elevados (C:H, I:H, A:H).
Inferido por nuestro agente de análisis a partir de la descripción oficial, el vector CVSS y la CWE, y comprobado por un supervisor. Puede contener errores.
🛡️ Mitigaciones ATT&CK que cubren estas técnicas
Tecnologías afectadas (1)
CWE
- CWE-787
Referencias
- https://git.kernel.org/stable/c/26e427ac85c2b8d0d108cc80b6de34d33e2780c4
- https://git.kernel.org/stable/c/381583845d19cb4bd21c8193449385f3fefa9caf
- https://git.kernel.org/stable/c/3af7d60e9a6c17d6d41c4341f8020511887d372d
- https://git.kernel.org/stable/c/519ff31a6ddd87aa4905bd9bf3b92e8b88801614
- https://git.kernel.org/stable/c/8489a20ac481b08c0391608d81ed3796d373cfdf
- https://git.kernel.org/stable/c/e7028944e61014ae915e7fb74963d3835f2f761a
- https://git.kernel.org/stable/c/ebda3d6b004bb6127a66a616524a2de152302ca7
JSON original (NVD)
Mostrar
{
"id": "CVE-2022-50156",
"cveTags": [],
"metrics": {
"cvssMetricV31": [
{
"type": "Secondary",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 7.8,
"attackVector": "LOCAL",
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "LOW",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.9,
"exploitabilityScore": 1.8
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 7.8,
"attackVector": "LOCAL",
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "LOW",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.9,
"exploitabilityScore": 1.8
}
]
},
"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": "542134c0375b5ca2b1d18490c02b8a20bfdd8d74",
"lessThan": "3af7d60e9a6c17d6d41c4341f8020511887d372d",
"versionType": "git"
},
{
"status": "affected",
"version": "542134c0375b5ca2b1d18490c02b8a20bfdd8d74",
"lessThan": "519ff31a6ddd87aa4905bd9bf3b92e8b88801614",
"versionType": "git"
},
{
"status": "affected",
"version": "542134c0375b5ca2b1d18490c02b8a20bfdd8d74",
"lessThan": "ebda3d6b004bb6127a66a616524a2de152302ca7",
"versionType": "git"
},
{
"status": "affected",
"version": "542134c0375b5ca2b1d18490c02b8a20bfdd8d74",
"lessThan": "8489a20ac481b08c0391608d81ed3796d373cfdf",
"versionType": "git"
},
{
"status": "affected",
"version": "542134c0375b5ca2b1d18490c02b8a20bfdd8d74",
"lessThan": "e7028944e61014ae915e7fb74963d3835f2f761a",
"versionType": "git"
},
{
"status": "affected",
"version": "542134c0375b5ca2b1d18490c02b8a20bfdd8d74",
"lessThan": "26e427ac85c2b8d0d108cc80b6de34d33e2780c4",
"versionType": "git"
},
{
"status": "affected",
"version": "542134c0375b5ca2b1d18490c02b8a20bfdd8d74",
"lessThan": "381583845d19cb4bd21c8193449385f3fefa9caf",
"versionType": "git"
}
],
"programFiles": [
"drivers/hid/hid-cp2112.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "4.15"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "4.15",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "4.19.256",
"versionType": "semver",
"lessThanOrEqual": "4.19.*"
},
{
"status": "unaffected",
"version": "5.4.211",
"versionType": "semver",
"lessThanOrEqual": "5.4.*"
},
{
"status": "unaffected",
"version": "5.10.137",
"versionType": "semver",
"lessThanOrEqual": "5.10.*"
},
{
"status": "unaffected",
"version": "5.15.61",
"versionType": "semver",
"lessThanOrEqual": "5.15.*"
},
{
"status": "unaffected",
"version": "5.18.18",
"versionType": "semver",
"lessThanOrEqual": "5.18.*"
},
{
"status": "unaffected",
"version": "5.19.2",
"versionType": "semver",
"lessThanOrEqual": "5.19.*"
},
{
"status": "unaffected",
"version": "6.0",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"drivers/hid/hid-cp2112.c"
],
"defaultStatus": "affected"
}
]
}
],
"published": "2025-06-18T11:15:45.747",
"references": [
{
"url": "https://git.kernel.org/stable/c/26e427ac85c2b8d0d108cc80b6de34d33e2780c4",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/381583845d19cb4bd21c8193449385f3fefa9caf",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/3af7d60e9a6c17d6d41c4341f8020511887d372d",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/519ff31a6ddd87aa4905bd9bf3b92e8b88801614",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/8489a20ac481b08c0391608d81ed3796d373cfdf",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/e7028944e61014ae915e7fb74963d3835f2f761a",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/ebda3d6b004bb6127a66a616524a2de152302ca7",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-787"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nHID: cp2112: prevent a buffer overflow in cp2112_xfer()\n\nSmatch warnings:\ndrivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy()\n'data->block[1]' too small (33 vs 255)\ndrivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy() 'buf' too\nsmall (64 vs 255)\n\nThe 'read_length' variable is provided by 'data->block[0]' which comes\nfrom user and it(read_length) can take a value between 0-255. Add an\nupper bound to 'read_length' variable to prevent a buffer overflow in\nmemcpy()."
},
{
"lang": "es",
"value": "En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: HID: cp2112: evitar un desbordamiento de búfer en cp2112_xfer() Advertencias de Smatch: drivers/hid/hid-cp2112.c:793 Error de cp2112_xfer(): __memcpy() 'data->block[1]' demasiado pequeño (33 frente a 255) drivers/hid/hid-cp2112.c:793 Error de cp2112_xfer(): __memcpy() 'buf' demasiado pequeño (64 frente a 255) La variable 'read_length' la proporciona 'data->block[0]', que proviene del usuario, y puede tomar un valor entre 0 y 255. Añada un límite superior a la variable 'read_length' para evitar un desbordamiento de búfer en memcpy()."
}
],
"lastModified": "2026-08-04T10:18:06.150",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "3DEB3209-65EF-4ABE-99F9-60C53FF4046D",
"versionEndExcluding": "4.19.256",
"versionStartIncluding": "4.15.1"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "B1C63D19-C08C-4308-A848-B2523C9275BD",
"versionEndExcluding": "5.4.211",
"versionStartIncluding": "4.20"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "C2BF720F-C5EE-4DE2-9BDF-CE4CFBC767F4",
"versionEndExcluding": "5.10.137",
"versionStartIncluding": "5.5"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "51861563-7F40-460F-82CD-2D3FBDAD6618",
"versionEndExcluding": "5.15.61",
"versionStartIncluding": "5.11"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "5B42E453-8837-49D0-A5EF-03F818A6DC11",
"versionEndExcluding": "5.18.18",
"versionStartIncluding": "5.16"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "A1A2A5A5-4598-4D7E-BA07-4660398D6C8F",
"versionEndExcluding": "5.19.2",
"versionStartIncluding": "5.19"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:4.15:-:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "3B4D39AF-668B-442B-8085-639A6D4FA5AC"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:4.15:rc6:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "639D2465-65E0-40E2-B7A8-BEA9E221DE54"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:4.15:rc7:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "A282AD0B-2D63-4F05-8F89-109A0975B423"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:4.15:rc8:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "30358221-183C-4699-994E-AF51F5D534FC"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:4.15:rc9:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "A5ED80A8-E656-4AE9-921B-C22402C94A4C"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}