# CVE-2024-42285: RDMA/iwcm: Fix a use-after-free related to destroying CM IDs

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.08% (percentile 65, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-08-17T09:08:51.302Z
- **Modified:** 2026-08-05T11:36:21.283Z

## Who should check

- Anyone running Linux \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< d91d253c87fd1efece521ff2612078a35af673c6; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< 7f25f296fc9bd0435be14e89bf657cd615a23574; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< 94ee7ff99b87435ec63211f632918dc7f44dac79; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< 557d035fe88d78dd51664f4dc0e1896c04c97cf6; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< dc8074b8901caabb97c2d353abd6b4e7fa5a59a5; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< ff5bbbdee08287d75d72e65b72a2b76d9637892a; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< ee39384ee787e86e9db4efb843818ef0ea9cb8ae; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< aee2424246f9f1dadc33faa78990c1e2eb7826e4
- Anyone running Linux 4.8

## Description

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

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

iw\_conn\_req\_handler() associates a new struct rdma\_id\_private (conn\_id) with
an existing struct iw\_cm\_id (cm\_id) as follows:

        conn\_id-\>cm\_id.iw = cm\_id;
        cm\_id-\>context = conn\_id;
        cm\_id-\>cm\_handler = cma\_iw\_handler;

rdma\_destroy\_id() frees both the cm\_id and the struct rdma\_id\_private. Make
sure that cm\_work\_handler() does not trigger a use-after-free by only
freeing of the struct rdma\_id\_private after all pending work has finished.

## Affected and fixed versions

- Linux: \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< d91d253c87fd1efece521ff2612078a35af673c6; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< 7f25f296fc9bd0435be14e89bf657cd615a23574; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< 94ee7ff99b87435ec63211f632918dc7f44dac79; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< 557d035fe88d78dd51664f4dc0e1896c04c97cf6; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< dc8074b8901caabb97c2d353abd6b4e7fa5a59a5; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< ff5bbbdee08287d75d72e65b72a2b76d9637892a; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< ee39384ee787e86e9db4efb843818ef0ea9cb8ae; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< aee2424246f9f1dadc33faa78990c1e2eb7826e4 (cvelist)
- Linux: 4.8 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-42285. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-42285.md
Affected: Linux >= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, < d91d253c87fd1efece521ff2612078a35af673c6; >= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, < 7f25f296fc9bd0435be14e89bf657cd615a23574; >= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, < 94ee7ff99b87435ec63211f632918dc7f44dac79; >= 59c68ac31e15ad09d2cb047…
Fixed in: Linux 7f25f296fc9bd0435be14e89bf657cd615a23574, Linux 94ee7ff99b87435ec63211f632918dc7f44dac79, Linux 557d035fe88d78dd51664f4dc0e1896c04c97cf6

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-42285 being exploited?

There is no confirmed exploitation: CVE-2024-42285 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.08% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-42285?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2024-42285?

Linux \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< d91d253c87fd1efece521ff2612078a35af673c6; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< 7f25f296fc9bd0435be14e89bf657cd615a23574; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< 94ee7ff99b87435ec63211f632918dc7f44dac79; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< 557d035fe88d78dd51664f4dc0e1896c04c97cf6; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< dc8074b8901caabb97c2d353abd6b4e7fa5a59a5; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< ff5bbbdee08287d75d72e65b72a2b76d9637892a; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< ee39384ee787e86e9db4efb843818ef0ea9cb8ae; \>= 59c68ac31e15ad09d2cb04734e3c8c544a95f8d4, \< aee2424246f9f1dadc33faa78990c1e2eb7826e4; Linux 4.8.

### Is there a fix for CVE-2024-42285?

Yes. Fixed in Linux 7f25f296fc9bd0435be14e89bf657cd615a23574, Linux 94ee7ff99b87435ec63211f632918dc7f44dac79, Linux 557d035fe88d78dd51664f4dc0e1896c04c97cf6. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-42285?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d91d253c87fd1efece521ff2612078a35af673c6>
- patch: <https://git.kernel.org/stable/c/7f25f296fc9bd0435be14e89bf657cd615a23574>
- patch: <https://git.kernel.org/stable/c/94ee7ff99b87435ec63211f632918dc7f44dac79>
- patch: <https://git.kernel.org/stable/c/557d035fe88d78dd51664f4dc0e1896c04c97cf6>
- patch: <https://git.kernel.org/stable/c/dc8074b8901caabb97c2d353abd6b4e7fa5a59a5>
- patch: <https://git.kernel.org/stable/c/ff5bbbdee08287d75d72e65b72a2b76d9637892a>
- patch: <https://git.kernel.org/stable/c/ee39384ee787e86e9db4efb843818ef0ea9cb8ae>
- patch: <https://git.kernel.org/stable/c/aee2424246f9f1dadc33faa78990c1e2eb7826e4>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-42285>

HTML: <https://flawdb.com/CVE-2024-42285> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-42285>
