CVE-2021-47081

habanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory

HIGH
7.8
CVSS Score
Published: March 1, 2024 at 09:15 PM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: habanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory Our code analyzer reported a uaf. In gaudi_memset_device_memory, cb is get via hl_cb_kernel_create() with 2 refcount. If hl_cs_allocate_job() failed, the execution runs into release_cb branch. One ref of cb is dropped by hl_cb_put(cb) and could be freed if other thread also drops one ref. Then cb is used by cb->id later, which is a potential uaf. My patch add a variable 'id' to accept the value of cb->id before the hl_cb_put(cb) is called, to avoid the potential uaf.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.12 ≤ v < 5.12.75.12 ≤ v < 5.13423815bf02e257091d5337be5c63b57fc29e42545.13 rc15.13 rc2
Vendor states this is fixed in 115726c5d312b462c9d9931ea42becdfa838a076 (fixed)
Vendor states this is fixed in b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7 (fixed)
Vendor states this is fixed in 5.12 (unaffected)
Vendor states this is fixed in 5.12.7 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/115726c5d312b462c9d9931ea42becdfa838a076
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card