{"id":"CVE-2021-47523","aliases":["CVE-2021-47523"],"related":[],"kind":"vulnerability","state":"published","title":"IB/hfi1: Fix leak of rcvhdrtail_dummy_kvaddr","summary":"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().","summarySource":"cvelist","descriptions":[{"lang":"en","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().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: IB/hfi1: Corrección de fuga de rcvhdrtail_dummy_kvaddr. Este búfer está actualmente asignado en hfi1_init(): if (reinit) ret = init_after_reset(dd); de lo contrario ret = loadtime_init(dd); si (ret) ir a hecho; /* asigna memoria de cola ficticia para todos los contextos de recepción */ dd-&gt;rcvhdrtail_dummy_kvaddr = dma_alloc_coherent(&amp;dd-&gt;pcidev-&gt;dev, sizeof(u64), &amp;dd-&gt;rcvhdrtail_dummy_dma, GFP_KERNEL); if (!dd-&gt;rcvhdrtail_dummy_kvaddr) { dd_dev_err(dd, \"no se puede asignar memoria de cola ficticia\\n\"); ret = -ENOMEM; ir a hacer; } La ruta activada por reinicio sobrescribirá la asignación anterior y la filtrará. Para solucionarlo, mueva la asignación a hfi1_alloc_devdata() y la desasignación a hfi1_free_devdata().","source":"nvd"}],"published":"2024-05-24T15:09:36.045Z","modified":"2026-06-17T04:17:41.370Z","severity":{"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"},"severities":[{"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-401"],"affected":[{"ranges":[{"type":"git","introduced":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","fixed":"2c08271f4ed0e24633b3f81ceff61052b9d45efc","status":"affected"},{"type":"git","introduced":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","fixed":"834d0fb978643eaf09da425de197cc16a7c2761b","status":"affected"},{"type":"git","introduced":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","fixed":"60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.5","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.5","status":"unaffected"},{"type":"semver","introduced":"5.10.85","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.8","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":[{"status":"affected","introduced":"4.5","fixed":"5.10.85"},{"status":"affected","introduced":"5.11","fixed":"5.15.8"},{"status":"affected","version":"5.16"},{"status":"affected","version":"5.16"},{"status":"affected","version":"5.16"},{"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/2c08271f4ed0e24633b3f81ceff61052b9d45efc","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/834d0fb978643eaf09da425de197cc16a7c2761b","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-05-24T19:17:45.550Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47523","url":"https://www.cve.org/CVERecord?id=CVE-2021-47523","licence":"CVE Terms of Use","modified":"2026-05-11T13:56:18.648Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47523","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47523","licence":"Public domain","modified":"2026-06-17T04:17:41.370Z"}],"updatedAt":"2026-11-25T22:58:08.899Z","epss":{"score":0.00239,"percentile":0.16029,"date":"2026-12-01T12:00:22.000Z"}}