CVE-2024-42285

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-42285
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-42285.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-42285
Downstream
Related
Published
2024-08-17T09:08:51.302Z
Modified
2025-11-27T02:33:25.624582Z
Summary
RDMA/iwcm: Fix a use-after-free related to destroying CM IDs
Details

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

RDMA/iwcm: Fix a use-after-free related to destroying CM IDs

iwconnreqhandler() associates a new struct rdmaidprivate (connid) with an existing struct iwcmid (cm_id) as follows:

    conn_id->cm_id.iw = cm_id;
    cm_id->context = conn_id;
    cm_id->cm_handler = cma_iw_handler;

rdmadestroyid() frees both the cmid and the struct rdmaidprivate. Make sure that cmworkhandler() does not trigger a use-after-free by only freeing of the struct rdmaid_private after all pending work has finished.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/blob/cc431b3424123d84bcd7afd4de150b33f117a8ef/cves/2024/42xxx/CVE-2024-42285.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
59c68ac31e15ad09d2cb04734e3c8c544a95f8d4
Fixed
d91d253c87fd1efece521ff2612078a35af673c6
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
59c68ac31e15ad09d2cb04734e3c8c544a95f8d4
Fixed
7f25f296fc9bd0435be14e89bf657cd615a23574
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
59c68ac31e15ad09d2cb04734e3c8c544a95f8d4
Fixed
94ee7ff99b87435ec63211f632918dc7f44dac79
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
59c68ac31e15ad09d2cb04734e3c8c544a95f8d4
Fixed
557d035fe88d78dd51664f4dc0e1896c04c97cf6
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
59c68ac31e15ad09d2cb04734e3c8c544a95f8d4
Fixed
dc8074b8901caabb97c2d353abd6b4e7fa5a59a5
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
59c68ac31e15ad09d2cb04734e3c8c544a95f8d4
Fixed
ff5bbbdee08287d75d72e65b72a2b76d9637892a
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
59c68ac31e15ad09d2cb04734e3c8c544a95f8d4
Fixed
ee39384ee787e86e9db4efb843818ef0ea9cb8ae
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
59c68ac31e15ad09d2cb04734e3c8c544a95f8d4
Fixed
aee2424246f9f1dadc33faa78990c1e2eb7826e4

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.8.0
Fixed
4.19.320
Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
5.4.282
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.224
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.165
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.103
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.44
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.10.3