# CVE-2021-47026: RDMA/rtrs-clt: destroy sysfs after removing session from active list

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 15% of CVEs (2026-12-01)
- Published: 2024-02-28T08:13:37.746Z
- Modified: 2026-06-17T04:16:13.970Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

RDMA/rtrs-clt: destroy sysfs after removing session from active list

A session can be removed dynamically by sysfs interface "remove_path" that
eventually calls rtrs_clt_remove_path_from_sysfs function.  The current
rtrs_clt_remove_path_from_sysfs first removes the sysfs interfaces and
frees sess->stats object. Second it removes the session from the active
list.

Therefore some functions could access non-connected session and access the
freed sess->stats object even-if they check the session status before
accessing the session.

For instance rtrs_clt_request and get_next_path_min_inflight check the
session status and try to send IO to the session.  The session status
could be changed when they are trying to send IO but they could not catch
the change and update the statistics information in sess->stats object,
and generate use-after-free problem.
(see: "RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its
stats")

This patch changes the rtrs_clt_remove_path_from_sysfs to remove the
session from the active session list and then destroy the sysfs
interfaces.

Each function still should check the session status because closing or
error recovery paths can change the status.

(As written by CVE List.)

## Affected

- Linux Linux: from 6a98d71daea186247005099758af549e6afdd244 before b64415c6b3476cf9fa4d0aea3807065b8403a937; from 6a98d71daea186247005099758af549e6afdd244 before 676171f9405dcaa45a33d18241c32f387dbaae39; from 6a98d71daea186247005099758af549e6afdd244 before d3cca8067d43dfee4a3535c645b55f618708dccb; from 6a98d71daea186247005099758af549e6afdd244 before 7f4a8592ff29f19c5a2ca549d0973821319afaad; 5.8 (not affected: before 5.8; from 5.10.37 up to 5.10.*; from 5.11.21 up to 5.11.*; from 5.12.4 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 5.8 before 5.10.37; from 5.11 before 5.11.21; from 5.12 before 5.12.4

## References

- <https://git.kernel.org/stable/c/b64415c6b3476cf9fa4d0aea3807065b8403a937> (patch)
- <https://git.kernel.org/stable/c/676171f9405dcaa45a33d18241c32f387dbaae39> (patch)
- <https://git.kernel.org/stable/c/d3cca8067d43dfee4a3535c645b55f618708dccb> (patch)
- <https://git.kernel.org/stable/c/7f4a8592ff29f19c5a2ca549d0973821319afaad> (patch)

## Sources

- CVE List: [CVE-2021-47026](https://www.cve.org/CVERecord?id=CVE-2021-47026), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47026](https://nvd.nist.gov/vuln/detail/CVE-2021-47026), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47026 · Whole record: https://cve.day/CVE-2021-47026.json · Rebuilt by cve.day 2026-11-25T22:58:08.621Z
