CVE-2021-47026

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-47026
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-47026.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-47026
Related
Published
2024-02-28T09:15:39Z
Modified
2024-09-11T02:00:04Z
Summary
[none]
Details

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 "removepath" that eventually calls rtrscltremovepathfromsysfs function. The current rtrscltremovepathfrom_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 rtrscltrequest and getnextpathmininflight 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 rtrscltsess before reading its stats")

This patch changes the rtrscltremovepathfrom_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.

References

Affected packages

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.38-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.38-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.38-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}