CVE-2025-68795
In the Linux kernel, the following vulnerability has been resolved:
ethtool: Avoid overflowing userspace buffer on stats query
The ethtool -S command operates across three ioctl calls: ETHTOOL_GSSET_INFO for the size, ETHTOOL_GSTRINGS for the names, and ETHTOOL_GSTATS for the values.
If the number of stats changes between these calls (e.g., due to device reconfiguration), userspace's buffer allocation will be incorrect, potentially leading to buffer overflow.
Drivers are generally expected to maintain stable stat counts, but some drivers (e.g., mlx5, bnx2x, bna, ksz884x) use dynamic counters, making this scenario possible.
Leer descripción completaMostrar menos
Some drivers try to handle this internally: - bnad_get_ethtool_stats() returns early in case stats.n_stats is not equal to the driver's stats count. - micrel/ksz884x also makes sure not to write anything beyond stats.n_stats and overflow the buffer.
However, both use stats.n_stats which is already assigned with the value returned from get_sset_count(), hence won't solve the issue described here.
Change ethtool_get_strings(), ethtool_get_stats(), ethtool_get_phy_stats() to not return anything in case of a mismatch between userspace's size and get_sset_size(), to prevent buffer overflow. The returned n_stats value will be equal to zero, to reflect that nothing has been returned.
This could result in one of two cases when using upstream ethtool, depending on when the size change is detected: 1. When detected in ethtool_get_strings(): # ethtool -S eth2 no stats available
2. When detected in get stats, all stats will be reported as zero.
Both cases are presumably transient, and a subsequent ethtool call should succeed.
Other than the overflow avoidance, these two cases are very evident (no output/cleared stats), which is arguably better than presenting incorrect/shifted stats. I also considered returning an error instead of a "silent" response, but that seems more destructive towards userspace apps.
Detalles técnicos trazas, registros y código del informe original
Notes: - This patch does not claim to fix the inherent race, it only makes sure that we do not overflow the userspace buffer, and makes for a more predictable behavior. - RTNL lock is held during each ioctl, the race window exists between the separate ioctl calls when the lock is released. - Userspace ethtool always fills stats.n_stats, but it is likely that these stats ioctls are implemented in other userspace applications which might not fill it. The added code checks that it's not zero, to prevent any regressions.
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.17%
- Percentil entre todas las CVEs puntuadas: 5
- 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).
🎯 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 escalation75 % - Impacto principal
T1565.001Stored Data Manipulationimpact65 % - Impacto secundario
T1499.004Application or System Exploitationimpact55 %
Escalada local: AV:L, PR:L, UI:N permite a usuario local explotar race condition en ethtool para desbordamiento de búfer. Impactos: corrupción de memoria/datos y DoS potencial.
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)
⚠ 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/3df375a1e75483b7d973c3cc2e46aa374db8428b
- https://git.kernel.org/stable/c/4066b5b546293f44cd6d0e84ece6e3ee7ff27093
- https://git.kernel.org/stable/c/4afcb985355210e1688560dc47e64b94dad35d71
- https://git.kernel.org/stable/c/7b07be1ff1cb6c49869910518650e8d0abc7d25f
- https://git.kernel.org/stable/c/7bea09f60f2ad5d232e2db8f1c14e850fd3fd416
- https://git.kernel.org/stable/c/ca9983bc3a1189bd72f9ae449d925a66b2616326
- https://git.kernel.org/stable/c/f9dc0f45d2cd0189ce666288a29d2cc32c2e44d5
JSON original (NVD)
Mostrar
{
"id": "CVE-2025-68795",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2025-68795",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2026-06-16T16:53:04.833978Z"
}
}
],
"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
}
]
},
"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": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
"lessThan": "3df375a1e75483b7d973c3cc2e46aa374db8428b",
"versionType": "git"
},
{
"status": "affected",
"version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
"lessThan": "f9dc0f45d2cd0189ce666288a29d2cc32c2e44d5",
"versionType": "git"
},
{
"status": "affected",
"version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
"lessThan": "4afcb985355210e1688560dc47e64b94dad35d71",
"versionType": "git"
},
{
"status": "affected",
"version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
"lessThan": "ca9983bc3a1189bd72f9ae449d925a66b2616326",
"versionType": "git"
},
{
"status": "affected",
"version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
"lessThan": "7bea09f60f2ad5d232e2db8f1c14e850fd3fd416",
"versionType": "git"
},
{
"status": "affected",
"version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
"lessThan": "4066b5b546293f44cd6d0e84ece6e3ee7ff27093",
"versionType": "git"
},
{
"status": "affected",
"version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
"lessThan": "7b07be1ff1cb6c49869910518650e8d0abc7d25f",
"versionType": "git"
}
],
"programFiles": [
"net/ethtool/ioctl.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.12"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "2.6.12",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "5.10.248",
"versionType": "semver",
"lessThanOrEqual": "5.10.*"
},
{
"status": "unaffected",
"version": "5.15.198",
"versionType": "semver",
"lessThanOrEqual": "5.15.*"
},
{
"status": "unaffected",
"version": "6.1.160",
"versionType": "semver",
"lessThanOrEqual": "6.1.*"
},
{
"status": "unaffected",
"version": "6.6.120",
"versionType": "semver",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.12.64",
"versionType": "semver",
"lessThanOrEqual": "6.12.*"
},
{
"status": "unaffected",
"version": "6.18.3",
"versionType": "semver",
"lessThanOrEqual": "6.18.*"
},
{
"status": "unaffected",
"version": "6.19",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"net/ethtool/ioctl.c"
],
"defaultStatus": "affected"
}
]
}
],
"published": "2026-01-13T16:16:01.420",
"references": [
{
"url": "https://git.kernel.org/stable/c/3df375a1e75483b7d973c3cc2e46aa374db8428b",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/4066b5b546293f44cd6d0e84ece6e3ee7ff27093",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/4afcb985355210e1688560dc47e64b94dad35d71",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/7b07be1ff1cb6c49869910518650e8d0abc7d25f",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/7bea09f60f2ad5d232e2db8f1c14e850fd3fd416",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/ca9983bc3a1189bd72f9ae449d925a66b2616326",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/f9dc0f45d2cd0189ce666288a29d2cc32c2e44d5",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
],
"vulnStatus": "Deferred",
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nethtool: Avoid overflowing userspace buffer on stats query\n\nThe ethtool -S command operates across three ioctl calls:\nETHTOOL_GSSET_INFO for the size, ETHTOOL_GSTRINGS for the names, and\nETHTOOL_GSTATS for the values.\n\nIf the number of stats changes between these calls (e.g., due to device\nreconfiguration), userspace's buffer allocation will be incorrect,\npotentially leading to buffer overflow.\n\nDrivers are generally expected to maintain stable stat counts, but some\ndrivers (e.g., mlx5, bnx2x, bna, ksz884x) use dynamic counters, making\nthis scenario possible.\n\nSome drivers try to handle this internally:\n- bnad_get_ethtool_stats() returns early in case stats.n_stats is not\n equal to the driver's stats count.\n- micrel/ksz884x also makes sure not to write anything beyond\n stats.n_stats and overflow the buffer.\n\nHowever, both use stats.n_stats which is already assigned with the value\nreturned from get_sset_count(), hence won't solve the issue described\nhere.\n\nChange ethtool_get_strings(), ethtool_get_stats(),\nethtool_get_phy_stats() to not return anything in case of a mismatch\nbetween userspace's size and get_sset_size(), to prevent buffer\noverflow.\nThe returned n_stats value will be equal to zero, to reflect that\nnothing has been returned.\n\nThis could result in one of two cases when using upstream ethtool,\ndepending on when the size change is detected:\n1. When detected in ethtool_get_strings():\n # ethtool -S eth2\n no stats available\n\n2. When detected in get stats, all stats will be reported as zero.\n\nBoth cases are presumably transient, and a subsequent ethtool call\nshould succeed.\n\nOther than the overflow avoidance, these two cases are very evident (no\noutput/cleared stats), which is arguably better than presenting\nincorrect/shifted stats.\nI also considered returning an error instead of a \"silent\" response, but\nthat seems more destructive towards userspace apps.\n\nNotes:\n- This patch does not claim to fix the inherent race, it only makes sure\n that we do not overflow the userspace buffer, and makes for a more\n predictable behavior.\n\n- RTNL lock is held during each ioctl, the race window exists between\n the separate ioctl calls when the lock is released.\n\n- Userspace ethtool always fills stats.n_stats, but it is likely that\n these stats ioctls are implemented in other userspace applications\n which might not fill it. The added code checks that it's not zero,\n to prevent any regressions."
},
{
"lang": "es",
"value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nethtool: Evitar el desbordamiento del búfer del espacio de usuario en la consulta de estadísticas\n\nEl comando ethtool -S opera a través de tres llamadas ioctl:\nETHTOOL_GSSET_INFO para el tamaño, ETHTOOL_GSTRINGS para los nombres, y\nETHTOOL_GSTATS para los valores.\n\nSi el número de estadísticas cambia entre estas llamadas (p. ej., debido a la\nreconfiguración del dispositivo), la asignación de búfer del espacio de usuario será incorrecta,\nlo que podría llevar a un desbordamiento de búfer.\n\nGeneralmente se espera que los controladores mantengan recuentos de estadísticas estables, pero algunos\ncontroladores (p. ej., mlx5, bnx2x, bna, ksz884x) usan contadores dinámicos, haciendo\nposible este escenario.\n\nAlgunos controladores intentan manejar esto internamente:\n- bnad_get_ethtool_stats() retorna temprano en caso de que stats.n_stats no sea\n igual al recuento de estadísticas del controlador.\n- micrel/ksz884x también se asegura de no escribir nada más allá de\n stats.n_stats y desbordar el búfer.\n\nSin embargo, ambos usan stats.n_stats que ya está asignado con el valor\nretornado de get_sset_count(), por lo tanto, no resolverá el problema descrito\naquí.\n\nCambiar ethtool_get_strings(), ethtool_get_stats(),\nethtool_get_phy_stats() para no retornar nada en caso de una discrepancia\nentre el tamaño del espacio de usuario y get_sset_size(), para prevenir el desbordamiento de búfer.\nEl valor n_stats retornado será igual a cero, para reflejar que\nno se ha retornado nada.\n\nEsto podría resultar en uno de dos casos al usar ethtool upstream,\ndependiendo de cuándo se detecte el cambio de tamaño:\n1. Cuando se detecta en ethtool_get_strings():\n # ethtool -S eth2\n no hay estadísticas disponibles\n\n2. Cuando se detecta en la obtención de estadísticas, todas las estadísticas se reportarán como cero.\n\nAmbos casos son presumiblemente transitorios, y una llamada ethtool subsiguiente\ndebería tener éxito.\n\nAparte de la evitación del desbordamiento, estos dos casos son muy evidentes (sin\nsalida/estadísticas borradas), lo cual es posiblemente mejor que presentar\nestadísticas incorrectas/desplazadas.\nTambién consideré retornar un error en lugar de una respuesta 'silenciosa', pero\neso parece más destructivo para las aplicaciones del espacio de usuario.\n\nNotas:\n- Este parche no pretende corregir la condición de carrera inherente, solo se asegura\n de que no desbordemos el búfer del espacio de usuario, y proporciona un comportamiento\n más predecible.\n\n- El bloqueo RTNL se mantiene durante cada ioctl, la ventana de carrera existe entre\n las llamadas ioctl separadas cuando se libera el bloqueo.\n\n- ethtool del espacio de usuario siempre llena stats.n_stats, pero es probable que\n estas ioctls de estadísticas estén implementadas en otras aplicaciones del espacio de usuario\n que podrían no llenarlo. El código añadido verifica que no sea cero,\n para prevenir cualquier regresión."
}
],
"lastModified": "2026-07-30T06:24:44.970",
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}