Use After Free in Linux
CVE-2021-47081
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.
Vulnerability class: Use-After-Free
EPSS: 0.002 (14.1th percentile) — read the EPSS interpretation.
CVSS v3 metric
CVSS v3 base score 7.8 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
Affected products
- Linux — versions 423815bf02e257091d5337be5c63b57fc29e4254, 5.12, 0
- Linux Linux_kernel — versions 5.13
Weakness classification (CWE)
References
Frequently asked questions
- What is CVE-2021-47081?
- CVE-2021-47081 is a high-severity vulnerability in Linux, classified under Use After Free. CVSS score: 7.8/10. Published 2024-03-01.
- How severe is CVE-2021-47081?
- High severity. CVSS v3 base score is 7.8 out of 10.