{"id":"CVE-2021-47548","aliases":["CVE-2021-47548"],"related":[],"kind":"vulnerability","state":"published","title":"ethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow in hns_dsaf_ge_srst_by_port()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow in hns_dsaf_ge_srst_by_port()\n\nThe if statement:\n  if (port >= DSAF_GE_NUM)\n        return;\n\nlimits the value of port less than DSAF_GE_NUM (i.e., 8).\nHowever, if the value of port is 6 or 7, an array overflow could occur:\n  port_rst_off = dsaf_dev->mac_cb[port]->port_rst_off;\n\nbecause the length of dsaf_dev->mac_cb is DSAF_MAX_PORT_NUM (i.e., 6).\n\nTo fix this possible array overflow, we first check port and if it is\ngreater than or equal to DSAF_MAX_PORT_NUM, the function returns.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow in hns_dsaf_ge_srst_by_port()\n\nThe if statement:\n  if (port >= DSAF_GE_NUM)\n        return;\n\nlimits the value of port less than DSAF_GE_NUM (i.e., 8).\nHowever, if the value of port is 6 or 7, an array overflow could occur:\n  port_rst_off = dsaf_dev->mac_cb[port]->port_rst_off;\n\nbecause the length of dsaf_dev->mac_cb is DSAF_MAX_PORT_NUM (i.e., 6).\n\nTo fix this possible array overflow, we first check port and if it is\ngreater than or equal to DSAF_MAX_PORT_NUM, the function returns.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux se ha resuelto la siguiente vulnerabilidad: ethernet: hisilicon: hns: hns_dsaf_misc: corrige un posible desbordamiento de matriz en hns_dsaf_ge_srst_by_port() La sentencia if: if (port &gt;= DSAF_GE_NUM) return; limita el valor del puerto a menos de DSAF_GE_NUM (es decir, 8). Sin embargo, si el valor del puerto es 6 o 7, podría producirse un desbordamiento de la matriz: port_rst_off = dsaf_dev-&gt;mac_cb[port]-&gt;port_rst_off; porque la longitud de dsaf_dev-&gt;mac_cb es DSAF_MAX_PORT_NUM (es decir, 6). Para solucionar este posible desbordamiento de la matriz, primero verificamos el puerto y si es mayor o igual a DSAF_MAX_PORT_NUM, la función regresa.","source":"nvd"}],"published":"2024-05-24T15:09:52.634Z","modified":"2026-06-17T04:17:44.320Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-129"],"affected":[{"ranges":[{"type":"git","introduced":"850bfa3b78ea8849fef78ed74f5f2ccf947db0ca","fixed":"948968f8747650447c8f21c9fdba0e1973be040b","status":"affected"},{"type":"git","introduced":"850bfa3b78ea8849fef78ed74f5f2ccf947db0ca","fixed":"abbd5faa0748d0aa95d5191d56ff7a17a6275bd1","status":"affected"},{"type":"git","introduced":"850bfa3b78ea8849fef78ed74f5f2ccf947db0ca","fixed":"dd07f8971b81ad98cc754b179b331b57f35aa1ff","status":"affected"},{"type":"git","introduced":"850bfa3b78ea8849fef78ed74f5f2ccf947db0ca","fixed":"99bb25cb6753beaf2c2bc37927c2ecc0ceff3f6d","status":"affected"},{"type":"git","introduced":"850bfa3b78ea8849fef78ed74f5f2ccf947db0ca","fixed":"22519eff7df2d88adcc2568d86046ce1e2b52803","status":"affected"},{"type":"git","introduced":"850bfa3b78ea8849fef78ed74f5f2ccf947db0ca","fixed":"fc7ffa7f10b9454a86369405d9814bf141b30627","status":"affected"},{"type":"git","introduced":"850bfa3b78ea8849fef78ed74f5f2ccf947db0ca","fixed":"a66998e0fbf213d47d02813b9679426129d0d114","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.9.292","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.257","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.220","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.164","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.84","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.7","lastAffected":"5.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.16","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"1da177e4c3f4","fixed":"948968f87476","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"1da177e4c3f4","fixed":"abbd5faa0748","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"1da177e4c3f4","fixed":"dd07f8971b81","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"1da177e4c3f4","fixed":"99bb25cb6753","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"1da177e4c3f4","fixed":"22519eff7df2","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"1da177e4c3f4","fixed":"fc7ffa7f10b9","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"1da177e4c3f4","fixed":"a66998e0fbf2","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"4.9.292","lastAffected":"4.9.*","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"4.14.257","lastAffected":"4.14*","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"4.19.220","lastAffected":"4.19.*","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"5.4.164","lastAffected":"5.4.*","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"5.10.84","lastAffected":"5.10.*","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"5.15.7","lastAffected":"5.15.*","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"version":"5.16","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"4.9.292"},{"status":"affected","introduced":"4.10","fixed":"4.14.257"},{"status":"affected","introduced":"4.15","fixed":"4.19.220"},{"status":"affected","introduced":"4.20","fixed":"5.4.164"},{"status":"affected","introduced":"5.5","fixed":"5.10.84"},{"status":"affected","introduced":"5.11","fixed":"5.15.7"},{"status":"affected","version":"5.16"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/948968f8747650447c8f21c9fdba0e1973be040b","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/abbd5faa0748d0aa95d5191d56ff7a17a6275bd1","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dd07f8971b81ad98cc754b179b331b57f35aa1ff","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/99bb25cb6753beaf2c2bc37927c2ecc0ceff3f6d","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/22519eff7df2d88adcc2568d86046ce1e2b52803","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fc7ffa7f10b9454a86369405d9814bf141b30627","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a66998e0fbf213d47d02813b9679426129d0d114","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2024-06-05T14:45:02.339Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47548","url":"https://www.cve.org/CVERecord?id=CVE-2021-47548","licence":"CVE Terms of Use","modified":"2026-05-11T13:56:45.302Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47548","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47548","licence":"Public domain","modified":"2026-06-17T04:17:44.320Z"}],"updatedAt":"2026-11-25T22:58:08.909Z","epss":{"score":0.01532,"percentile":0.75134,"date":"2026-11-30T12:00:22.000Z"}}