{"id":"CVE-2021-47523","state":"PUBLISHED","title":"IB/hfi1: Fix leak of rcvhdrtail_dummy_kvaddr","description":"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().","publishedAt":"2024-05-24T15:09:36.045Z","updatedAt":"2026-05-11T13:56:18.648Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","status":"affected","lessThan":"2c08271f4ed0e24633b3f81ceff61052b9d45efc","versionType":"git"},{"version":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","status":"affected","lessThan":"834d0fb978643eaf09da425de197cc16a7c2761b","versionType":"git"},{"version":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","status":"affected","lessThan":"60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/hfi1/init.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.5","versionType":"semver"},{"version":"5.10.85","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.8","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/hfi1/init.c"]}],"references":["https://git.kernel.org/stable/c/2c08271f4ed0e24633b3f81ceff61052b9d45efc","https://git.kernel.org/stable/c/834d0fb978643eaf09da425de197cc16a7c2761b","https://git.kernel.org/stable/c/60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1"],"weaknesses":[],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47523.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47523","state":"PUBLISHED","datePublished":"2024-05-24T15:09:36.045Z","dateUpdated":"2026-05-11T13:56:18.648Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-24T15:02:54.825Z"},"containers":{"cna":{"title":"IB/hfi1: Fix leak of rcvhdrtail_dummy_kvaddr","descriptions":[{"lang":"en","value":"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()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","status":"affected","lessThan":"2c08271f4ed0e24633b3f81ceff61052b9d45efc","versionType":"git"},{"version":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","status":"affected","lessThan":"834d0fb978643eaf09da425de197cc16a7c2761b","versionType":"git"},{"version":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","status":"affected","lessThan":"60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/hfi1/init.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.5","versionType":"semver"},{"version":"5.10.85","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.8","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/hfi1/init.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/2c08271f4ed0e24633b3f81ceff61052b9d45efc"},{"url":"https://git.kernel.org/stable/c/834d0fb978643eaf09da425de197cc16a7c2761b"},{"url":"https://git.kernel.org/stable/c/60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T13:56:18.648Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.5","versionEndExcluding":"5.10.85"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.5","versionEndExcluding":"5.15.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.5","versionEndExcluding":"5.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2021-47523","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-05-24T19:17:45.550563Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:14:34.257Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/2c08271f4ed0e24633b3f81ceff61052b9d45efc","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/834d0fb978643eaf09da425de197cc16a7c2761b","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:39:59.792Z"}}]}}}