{"id":"CVE-2021-47523","published":"2024-05-24T15:09:36Z","modified":"2026-05-11T13:56:18Z","title":"IB/hfi1: Fix leak of rcvhdrtail_dummy_kvaddr","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nIB/hfi1: Fix leak of rcvhdrtail_dummy_kvaddr\n\nThis buffer is currently allocated in hfi1_init():\n\n\tif (reinit)\n\t\tret = init_after_reset(dd);\n\telse\n\t\tret = loadtime_init(dd);\n\tif (ret)\n\t\tgoto done;\n\n\t/* allocate dummy tail memory for all receive contexts */\n\tdd->rcvhdrtail_dummy_kvaddr = dma_alloc_coherent(&dd->pcidev->dev,\n\t\t\t\t\t\t\t sizeof(u64),\n\t\t\t\t\t\t\t &dd->rcvhdrtail_dummy_dma,\n\t\t\t\t\t\t\t GFP_KERNEL);\n\n\tif (!dd->rcvhdrtail_dummy_kvaddr) {\n\t\tdd_dev_err(dd, \"cannot allocate dummy tail memory\\n\");\n\t\tret = -ENOMEM;\n\t\tgoto done;\n\t}\n\nThe reinit triggered path will overwrite the old allocation and leak it.\n\nFix by moving the allocation to hfi1_alloc_devdata() and the deallocation\nto hfi1_free_devdata().","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00239,"percentile":0.15254,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/2c08271f4ed0e24633b3f81ceff61052b9d45efc","tags":[]},{"url":"https://git.kernel.org/stable/c/834d0fb978643eaf09da425de197cc16a7c2761b","tags":[]},{"url":"https://git.kernel.org/stable/c/60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1","tags":[]}],"priority":{"score":3.1,"factors":[{"name":"EPSS percentile","points":3.05}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 46b010d3eeb8eb29c740c4ef09c666485f5c07e6, < 2c08271f4ed0e24633b3f81ceff61052b9d45efc",">= 46b010d3eeb8eb29c740c4ef09c666485f5c07e6, < 834d0fb978643eaf09da425de197cc16a7c2761b",">= 46b010d3eeb8eb29c740c4ef09c666485f5c07e6, < 60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1"]},{"vendor":"Linux","product":"Linux","versions":["4.5"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-05-24T19:17:45.550563Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2021-34527","exploited":false,"provenance":"source"}}