CVE-2022-50131
In the Linux kernel, the following vulnerability has been resolved:
HID: mcp2221: prevent a buffer overflow in mcp_smbus_write()
Smatch Warning: drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() '&mcp->txbuf[5]' too small (59 vs 255) drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() 'buf' too small (34 vs 255)
The 'len' variable can take a value between 0-255 as it can come from data->block[0] and it is user data. So add an bound check 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 % - Impacto secundario
T1499.004Application or System Exploitationimpact60 %
Vuln. local (AV:L/PR:L) sin interacción: escalada privilegios mediante buffer overflow en driver HID/SMBus. Overflow permite ejecución de código arbitrario en kernel context (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/3c0f8a59f2cc8841ee6653399a77f4f3e6e9a270
- https://git.kernel.org/stable/c/62ac2473553a00229e67bdf3cb023b62cf7f5a9a
- https://git.kernel.org/stable/c/6402116a7b5ec80fa40fd145a80c813019cd555f
- https://git.kernel.org/stable/c/66c8e816f2f2ca4a61b406503bd10bad1b35f72f
- https://git.kernel.org/stable/c/91443c669d280937968f0aa4edefa741cfe35314
JSON original (NVD)
Mostrar
{
"id": "CVE-2022-50131",
"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": "67a95c21463d066060b0f66d65a75d45bb386ffb",
"lessThan": "66c8e816f2f2ca4a61b406503bd10bad1b35f72f",
"versionType": "git"
},
{
"status": "affected",
"version": "67a95c21463d066060b0f66d65a75d45bb386ffb",
"lessThan": "91443c669d280937968f0aa4edefa741cfe35314",
"versionType": "git"
},
{
"status": "affected",
"version": "67a95c21463d066060b0f66d65a75d45bb386ffb",
"lessThan": "6402116a7b5ec80fa40fd145a80c813019cd555f",
"versionType": "git"
},
{
"status": "affected",
"version": "67a95c21463d066060b0f66d65a75d45bb386ffb",
"lessThan": "3c0f8a59f2cc8841ee6653399a77f4f3e6e9a270",
"versionType": "git"
},
{
"status": "affected",
"version": "67a95c21463d066060b0f66d65a75d45bb386ffb",
"lessThan": "62ac2473553a00229e67bdf3cb023b62cf7f5a9a",
"versionType": "git"
}
],
"programFiles": [
"drivers/hid/hid-mcp2221.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "5.7"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "5.7",
"versionType": "semver"
},
{
"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-mcp2221.c"
],
"defaultStatus": "affected"
}
]
}
],
"published": "2025-06-18T11:15:42.920",
"references": [
{
"url": "https://git.kernel.org/stable/c/3c0f8a59f2cc8841ee6653399a77f4f3e6e9a270",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/62ac2473553a00229e67bdf3cb023b62cf7f5a9a",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/6402116a7b5ec80fa40fd145a80c813019cd555f",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/66c8e816f2f2ca4a61b406503bd10bad1b35f72f",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/91443c669d280937968f0aa4edefa741cfe35314",
"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: mcp2221: prevent a buffer overflow in mcp_smbus_write()\n\nSmatch Warning:\ndrivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy()\n'&mcp->txbuf[5]' too small (59 vs 255)\ndrivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() 'buf'\ntoo small (34 vs 255)\n\nThe 'len' variable can take a value between 0-255 as it can come from\ndata->block[0] and it is user data. So add an bound check to prevent a\nbuffer overflow in memcpy()."
},
{
"lang": "es",
"value": "En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: HID: mcp2221: evitar un desbordamiento de búfer en mcp_smbus_write() Advertencia de Smatch: drivers/hid/hid-mcp2221.c:388 Error de mcp_smbus_write(): __memcpy() '&mcp->txbuf[5]' demasiado pequeño (59 frente a 255) drivers/hid/hid-mcp2221.c:388 Error de mcp_smbus_write(): __memcpy() 'buf' demasiado pequeño (34 frente a 255) La variable 'len' puede tomar un valor entre 0 y 255, ya que puede provenir de data->block[0] y son datos de usuario. Por lo tanto, agregue una comprobación de límite para evitar un desbordamiento de búfer en memcpy()."
}
],
"lastModified": "2026-08-04T10:18:05.643",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "674AABE4-BC3E-4530-9717-5DFE7AB70A3F",
"versionEndExcluding": "5.10.137",
"versionStartIncluding": "5.7"
},
{
"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"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}