In the Linux kernel, the following vulnerability has been resolved:
RDMA/siw: Fix a use after free in siw_alloc_mr
Our code analyzer reported a UAF.
In siw_alloc_mr(), it calls siw_mr_add_mem(mr,..). In the implementation of
siw_mr_add_mem(), mem is assigned to mr->mem and then mem is freed via
kfree(mem) if xa_alloc_cyclic() failed. Here, mr->mem still point to a
freed object. After, the execution continue up to the err_out branch of
siw_alloc_mr, and the freed mr->mem is used in siw_mr_drop_mem(mr).
My patch moves "mr->mem = mem" behind the if (xa_alloc_cyclic(..)<0) {}
section, to avoid the uaf.
Metrics
Affected Vendors & Products
References
History
Mon, 04 Nov 2024 13:15:00 +0000
Type | Values Removed | Values Added |
---|---|---|
Metrics |
ssvc
|
MITRE
Status: PUBLISHED
Assigner: Linux
Published: 2024-02-28T08:13:30.284Z
Updated: 2024-11-04T11:57:42.023Z
Reserved: 2024-02-27T18:42:55.953Z
Link: CVE-2021-47012
Vulnrichment
Updated: 2024-08-04T05:24:39.841Z
NVD
Status : Awaiting Analysis
Published: 2024-02-28T09:15:38.753
Modified: 2024-02-28T14:06:45.783
Link: CVE-2021-47012
Redhat