{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-47750","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-09-30T16:00:12.961Z","datePublished":"2024-10-21T12:14:15.786Z","dateUpdated":"2026-08-05T11:39:58.173Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:39:58.173Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/hns: Fix Use-After-Free of rsv_qp on HIP08\n\nCurrently rsv_qp is freed before ib_unregister_device() is called\non HIP08. During the time interval, users can still dereg MR and\nrsv_qp will be used in this process, leading to a UAF. Move the\nrelease of rsv_qp after calling ib_unregister_device() to fix it."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached by a local process issuing an MR deregistration on an RDMA verbs character device (/dev/infiniband/uverbs*, typically mode 0666 under stock rdma-core udev rules), i.e. via ioctl/write on a local device file. No remote packet processing reaches `free_mr_send_cmd_to_hw()`.\nAC:L - The attacker owns the consuming side of the race and can keep many threads permanently spinning in `ib_dereg_mr()`, so threads are continuously resident in the completely unsynchronized window between the `hr_dev->state` TOCTOU check and the dereference of `free_mr->rsv_qp[]`/`rsv_cq`; whenever the routine teardown or hardware reset path runs `free_mr_exit()`, the race is won reliably, and the freed `struct hns_roce_qp` is a plain kmalloc object the attacker can spray.\nPR:L - Only an ordinary unprivileged local account is needed — opening the uverbs device, allocating a PD and registering a small MR (within the default RLIMIT_MEMLOCK, so no CAP_IPC_LOCK), then deregistering it, is enough to enter `hns_roce_v2_dereg_mr()`. No root, CAP_NET_ADMIN, or capability in any namespace is required.\nUI:N - The attacker's own dereg-MR loop drives the vulnerable path entirely on its own; no victim action, file open, or mount is needed, and the teardown side is a routine system event rather than a user-performed step.\nS:U - The use-after-free corrupts kernel heap state within the same kernel security authority; there is no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - This is a use-after-free on a heap-allocated `struct hns_roce_qp` and `struct hns_roce_cq`; after slab reallocation, `hns_roce_v2_post_send()` and `hns_roce_v2_poll_cq()` read pointers, MTR translation state, and CQE contents out of attacker-groomed memory, yielding an arbitrary kernel-memory read primitive.\nI:H - `hns_roce_v2_post_send()` writes a WQE and `qp->sq.wrid[wqe_idx]` through addresses computed from the freed object's fields and takes a spinlock on freed memory, so reclaiming the slab gives a controlled kernel write usable for control-flow hijack and privilege escalation; `mutex_lock()` on a `mutex_destroy()`ed lock compounds the corruption.\nA:H - Even without successful heap grooming, dereferencing the freed reserved QP/CQ and locking a destroyed mutex reliably produces a KASAN splat, list corruption, or kernel oops/panic, taking the RDMA-serving host down."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/hns/hns_roce_hw_v2.c"],"versions":[{"version":"70f92521584f1d1e8268311ee84413307b0fdea8","lessThan":"2ccf1c75d39949d8ea043d04a2e92d7100ea723d","status":"affected","versionType":"git"},{"version":"70f92521584f1d1e8268311ee84413307b0fdea8","lessThan":"d2d9c5127122745da6e887f451dd248cfeffca33","status":"affected","versionType":"git"},{"version":"70f92521584f1d1e8268311ee84413307b0fdea8","lessThan":"dac2723d8bfa9cf5333f477741e6e5fa1ed34645","status":"affected","versionType":"git"},{"version":"70f92521584f1d1e8268311ee84413307b0fdea8","lessThan":"60595923371c2ebe7faf82536c47eb0c967e3425","status":"affected","versionType":"git"},{"version":"70f92521584f1d1e8268311ee84413307b0fdea8","lessThan":"fd8489294dd2beefb70f12ec4f6132aeec61a4d0","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/hns/hns_roce_hw_v2.c"],"versions":[{"version":"5.18","status":"affected"},{"version":"0","lessThan":"5.18","status":"unaffected","versionType":"semver"},{"version":"6.1.113","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.54","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.10.13","lessThanOrEqual":"6.10.*","status":"unaffected","versionType":"semver"},{"version":"6.11.2","lessThanOrEqual":"6.11.*","status":"unaffected","versionType":"semver"},{"version":"6.12","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.1.113"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.6.54"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.10.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.11.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.12"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/2ccf1c75d39949d8ea043d04a2e92d7100ea723d"},{"url":"https://git.kernel.org/stable/c/d2d9c5127122745da6e887f451dd248cfeffca33"},{"url":"https://git.kernel.org/stable/c/dac2723d8bfa9cf5333f477741e6e5fa1ed34645"},{"url":"https://git.kernel.org/stable/c/60595923371c2ebe7faf82536c47eb0c967e3425"},{"url":"https://git.kernel.org/stable/c/fd8489294dd2beefb70f12ec4f6132aeec61a4d0"}],"title":"RDMA/hns: Fix Use-After-Free of rsv_qp on HIP08","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-47750","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-10-21T12:58:02.690049Z"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-10-21T13:04:13.178Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T22:21:45.725Z"}}]}}