{"id":"CVE-2021-47159","aliases":["CVE-2021-47159"],"related":[],"kind":"vulnerability","state":"published","title":"net: dsa: fix a crash if ->get_sset_count() fails","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: dsa: fix a crash if ->get_sset_count() fails\n\nIf ds->ops->get_sset_count() fails then it \"count\" is a negative error\ncode such as -EOPNOTSUPP.  Because \"i\" is an unsigned int, the negative\nerror code is type promoted to a very high value and the loop will\ncorrupt memory until the system crashes.\n\nFix this by checking for error codes and changing the type of \"i\" to\njust int.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: dsa: fix a crash if ->get_sset_count() fails\n\nIf ds->ops->get_sset_count() fails then it \"count\" is a negative error\ncode such as -EOPNOTSUPP.  Because \"i\" is an unsigned int, the negative\nerror code is type promoted to a very high value and the loop will\ncorrupt memory until the system crashes.\n\nFix this by checking for error codes and changing the type of \"i\" to\njust int.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net: dsa: corrige un bloqueo si -&gt;get_sset_count() falla. Si ds-&gt;ops-&gt;get_sset_count() falla, entonces \"count\" es un código de error negativo como - EOPNOTSUPP. Debido a que \"i\" es un int sin signo, el código de error negativo se promociona a un valor muy alto y el bucle corromperá la memoria hasta que el sistema falle. Solucione este problema buscando códigos de error y cambiando el tipo de \"i\" a solo int.","source":"nvd"}],"published":"2024-03-25T09:16:13.815Z","modified":"2026-08-05T08:46:23.974Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-835"],"affected":[{"ranges":[{"type":"git","introduced":"badf3ada60ab8f76f9488dc8f5c0c57f70682f5a","fixed":"0f2cb08c57edefb0e7b5045e0e3e9980a3d3aa37","status":"affected"},{"type":"git","introduced":"badf3ada60ab8f76f9488dc8f5c0c57f70682f5a","fixed":"ce5355f140a7987011388c7e30c4f8fbe180d3e8","status":"affected"},{"type":"git","introduced":"badf3ada60ab8f76f9488dc8f5c0c57f70682f5a","fixed":"caff86f85512b8e0d9830e8b8b0dfe13c68ce5b6","status":"affected"},{"type":"git","introduced":"badf3ada60ab8f76f9488dc8f5c0c57f70682f5a","fixed":"7b22466648a4f8e3e94f57ca428d1531866d1373","status":"affected"},{"type":"git","introduced":"badf3ada60ab8f76f9488dc8f5c0c57f70682f5a","fixed":"a269333fa5c0c8e53c92b5a28a6076a28cde3e83","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.7","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.7","status":"unaffected"},{"type":"semver","introduced":"4.19.193","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.124","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.42","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.12.9","lastAffected":"5.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.7","fixed":"4.19.193"},{"status":"affected","introduced":"4.20","fixed":"5.4.124"},{"status":"affected","introduced":"5.5","fixed":"5.10.42"},{"status":"affected","introduced":"5.11","fixed":"5.12.9"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/0f2cb08c57edefb0e7b5045e0e3e9980a3d3aa37","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ce5355f140a7987011388c7e30c4f8fbe180d3e8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/caff86f85512b8e0d9830e8b8b0dfe13c68ce5b6","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7b22466648a4f8e3e94f57ca428d1531866d1373","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a269333fa5c0c8e53c92b5a28a6076a28cde3e83","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T15:54:44.376Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47159","url":"https://www.cve.org/CVERecord?id=CVE-2021-47159","licence":"CVE Terms of Use","modified":"2026-08-05T08:46:23.974Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47159","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47159","licence":"Public domain","modified":"2026-08-04T10:16:49.477Z"}],"updatedAt":"2026-11-25T22:58:08.691Z","epss":{"score":0.00247,"percentile":0.17085,"date":"2026-12-01T12:00:22.000Z"}}