{"id":"CVE-2021-47081","published":"2024-03-01T21:15:16Z","modified":"2026-08-05T08:45:52Z","title":"habanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory","vendor":"Linux","product":"Linux","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00233,"percentile":0.08499,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7","tags":[]},{"url":"https://git.kernel.org/stable/c/115726c5d312b462c9d9931ea42becdfa838a076","tags":[]}],"priority":{"score":7.2,"factors":[{"name":"EPSS percentile","points":1.7},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 423815bf02e257091d5337be5c63b57fc29e4254, < b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7",">= 423815bf02e257091d5337be5c63b57fc29e4254, < 115726c5d312b462c9d9931ea42becdfa838a076"]},{"vendor":"Linux","product":"Linux","versions":["5.12"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-03-04T19:32:29.244809Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2021-33729","exploited":false,"provenance":"source"}}