{"id":"CVE-2021-47548","published":"2024-05-24T15:09:52Z","modified":"2026-05-11T13:56:45Z","title":"ethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow in hns_dsaf_ge_srst_by_port()","vendor":"Linux","product":"Linux","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.01358,"percentile":0.72365,"provenance":"source"},"cwes":[{"id":"CWE-129","name":"Improper Validation of Array Index"}],"references":[{"url":"https://git.kernel.org/stable/c/948968f8747650447c8f21c9fdba0e1973be040b","tags":[]},{"url":"https://git.kernel.org/stable/c/abbd5faa0748d0aa95d5191d56ff7a17a6275bd1","tags":[]},{"url":"https://git.kernel.org/stable/c/dd07f8971b81ad98cc754b179b331b57f35aa1ff","tags":[]},{"url":"https://git.kernel.org/stable/c/99bb25cb6753beaf2c2bc37927c2ecc0ceff3f6d","tags":[]},{"url":"https://git.kernel.org/stable/c/22519eff7df2d88adcc2568d86046ce1e2b52803","tags":[]},{"url":"https://git.kernel.org/stable/c/fc7ffa7f10b9454a86369405d9814bf141b30627","tags":[]},{"url":"https://git.kernel.org/stable/c/a66998e0fbf213d47d02813b9679426129d0d114","tags":[]}],"priority":{"score":21.3,"factors":[{"name":"EPSS percentile","points":14.47},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, < 948968f8747650447c8f21c9fdba0e1973be040b",">= 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, < abbd5faa0748d0aa95d5191d56ff7a17a6275bd1",">= 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, < dd07f8971b81ad98cc754b179b331b57f35aa1ff",">= 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, < 99bb25cb6753beaf2c2bc37927c2ecc0ceff3f6d",">= 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, < 22519eff7df2d88adcc2568d86046ce1e2b52803",">= 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, < fc7ffa7f10b9454a86369405d9814bf141b30627",">= 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, < a66998e0fbf213d47d02813b9679426129d0d114"]},{"vendor":"Linux","product":"Linux","versions":["4.7"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2024-06-05T14:45:02.339644Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2021-34550","exploited":false,"provenance":"source"}}