{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-47523","id":"CVE-2021-47523","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","descriptionLong":"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().","published":"2024-05-24T15:09:36.045Z","updated":"2026-06-17T04:17:41.370Z","reserved":"2024-05-24T15:02:54.825Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"OSV"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","lessThan":"2c08271f4ed0e24633b3f81ceff61052b9d45efc","status":"affected","versionType":"git"},{"version":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","lessThan":"834d0fb978643eaf09da425de197cc16a7c2761b","status":"affected","versionType":"git"},{"version":"46b010d3eeb8eb29c740c4ef09c666485f5c07e6","lessThan":"60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.5","status":"affected"},{"version":"0","lessThan":"4.5","status":"unaffected","versionType":"semver"},{"version":"5.10.85","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.8","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"5.16","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-401"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/2c08271f4ed0e24633b3f81ceff61052b9d45efc","tags":["x_transferred","Patch","fix"]},{"url":"https://git.kernel.org/stable/c/834d0fb978643eaf09da425de197cc16a7c2761b","tags":["x_transferred","Patch","fix"]},{"url":"https://git.kernel.org/stable/c/60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1","tags":["x_transferred","Patch","fix"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00239,"epssPercentile":0.15141,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-47523","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47523","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-47523","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-47523","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}