{"id":"CVE-2021-47081","aliases":["CVE-2021-47081"],"related":[],"kind":"vulnerability","state":"published","title":"habanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nhabanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory\n\nOur code analyzer reported a uaf.\n\nIn gaudi_memset_device_memory, cb is get via hl_cb_kernel_create()\nwith 2 refcount.\nIf hl_cs_allocate_job() failed, the execution runs into release_cb\nbranch. One ref of cb is dropped by hl_cb_put(cb) and could be freed\nif other thread also drops one ref. Then cb is used by cb->id later,\nwhich is a potential uaf.\n\nMy patch add a variable 'id' to accept the value of cb->id before the\nhl_cb_put(cb) is called, to avoid the potential uaf.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nhabanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory\n\nOur code analyzer reported a uaf.\n\nIn gaudi_memset_device_memory, cb is get via hl_cb_kernel_create()\nwith 2 refcount.\nIf hl_cs_allocate_job() failed, the execution runs into release_cb\nbranch. One ref of cb is dropped by hl_cb_put(cb) and could be freed\nif other thread also drops one ref. Then cb is used by cb->id later,\nwhich is a potential uaf.\n\nMy patch add a variable 'id' to accept the value of cb->id before the\nhl_cb_put(cb) is called, to avoid the potential uaf.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux se ha resuelto la siguiente vulnerabilidad: habanalabs/gaudi: Corregir un uso potencial después de liberar en gaudi_memset_device_memory Nuestro analizador de código reportó un uaf. En gaudi_memset_device_memory, cb se obtiene a través de hl_cb_kernel_create() con 2 refcount. Si hl_cs_allocate_job() falla, la ejecución se ejecuta en la rama release_cb. hl_cb_put(cb) elimina una referencia de cb y podría liberarse si otro hilo también elimina una referencia. Luego, cb-&gt;id usa cb más tarde, que es un uaf potencial. Mi parche agrega una variable 'id' para aceptar el valor de cb-&gt;id antes de llamar a hl_cb_put(cb), para evitar el potencial uaf.","source":"nvd"}],"published":"2024-03-01T21:15:16.684Z","modified":"2026-08-05T08:45:52.781Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"423815bf02e257091d5337be5c63b57fc29e4254","fixed":"b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7","status":"affected"},{"type":"git","introduced":"423815bf02e257091d5337be5c63b57fc29e4254","fixed":"115726c5d312b462c9d9931ea42becdfa838a076","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.12","status":"unaffected"},{"type":"semver","introduced":"5.12.7","lastAffected":"5.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.13","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":"5.12","fixed":"5.12.7"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/115726c5d312b462c9d9931ea42becdfa838a076","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-03-04T19:32:29.244Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47081","url":"https://www.cve.org/CVERecord?id=CVE-2021-47081","licence":"CVE Terms of Use","modified":"2026-08-05T08:45:52.781Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47081","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47081","licence":"Public domain","modified":"2026-08-04T10:16:44.503Z"}],"updatedAt":"2026-11-25T22:58:08.651Z","epss":{"score":0.00233,"percentile":0.15129,"date":"2026-12-01T12:00:22.000Z"}}