CVE-2021-47081CWE-416

CVE-2021-47081

High · published March 2, 2024

CVSS v3.1
7.8
EPSS
0%
Percentile
13.4
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00233 · 13.4th percentile
Weakness
CWE-416 · Use After Free
Published
2024-03-02T03:15Z
Affected products (3)
ProductVersionsFixed in
linux/linux_kernel≥ 5.12, < 5.12.75.12.7
linux/linux_kernelall versions—
linux/linux_kernelall versions—
References (4)
EPSS history
Timeline
  • 01 MAR 21:15Z
    habanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory
    cvelistv5