CVE-2021-47026
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
28/02/2024
Last modified:
09/01/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
RDMA/rtrs-clt: destroy sysfs after removing session from active list<br />
<br />
A session can be removed dynamically by sysfs interface "remove_path" that<br />
eventually calls rtrs_clt_remove_path_from_sysfs function. The current<br />
rtrs_clt_remove_path_from_sysfs first removes the sysfs interfaces and<br />
frees sess->stats object. Second it removes the session from the active<br />
list.<br />
<br />
Therefore some functions could access non-connected session and access the<br />
freed sess->stats object even-if they check the session status before<br />
accessing the session.<br />
<br />
For instance rtrs_clt_request and get_next_path_min_inflight check the<br />
session status and try to send IO to the session. The session status<br />
could be changed when they are trying to send IO but they could not catch<br />
the change and update the statistics information in sess->stats object,<br />
and generate use-after-free problem.<br />
(see: "RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its<br />
stats")<br />
<br />
This patch changes the rtrs_clt_remove_path_from_sysfs to remove the<br />
session from the active session list and then destroy the sysfs<br />
interfaces.<br />
<br />
Each function still should check the session status because closing or<br />
error recovery paths can change the status.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.8 (including) | 5.10.37 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.11.21 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.12 (including) | 5.12.4 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/676171f9405dcaa45a33d18241c32f387dbaae39
- https://git.kernel.org/stable/c/7f4a8592ff29f19c5a2ca549d0973821319afaad
- https://git.kernel.org/stable/c/b64415c6b3476cf9fa4d0aea3807065b8403a937
- https://git.kernel.org/stable/c/d3cca8067d43dfee4a3535c645b55f618708dccb
- https://git.kernel.org/stable/c/676171f9405dcaa45a33d18241c32f387dbaae39
- https://git.kernel.org/stable/c/7f4a8592ff29f19c5a2ca549d0973821319afaad
- https://git.kernel.org/stable/c/b64415c6b3476cf9fa4d0aea3807065b8403a937
- https://git.kernel.org/stable/c/d3cca8067d43dfee4a3535c645b55f618708dccb



