{"id":"CVE-2024-38542","state":"PUBLISHED","title":"RDMA/mana_ib: boundary check before installing cq callbacks","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mana_ib: boundary check before installing cq callbacks\n\nAdd a boundary check inside mana_ib_install_cq_cb to prevent index overflow.","publishedAt":"2024-06-19T13:35:17.310Z","updatedAt":"2026-08-05T11:32:40.715Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"cf9cc859d6ff37ce52c09dfbb169b9ee25595a3f","status":"affected","lessThan":"f12afddfb142587d786df9e3cc4862190d3e2ec8","versionType":"git"},{"version":"2a31c5a7e0d87959a03e846523013c75f4395a91","status":"affected","lessThan":"168f6fbde0eabd71d1f4133df7d001a950b96977","versionType":"git"},{"version":"2a31c5a7e0d87959a03e846523013c75f4395a91","status":"affected","lessThan":"f79edef79b6a2161f4124112f9b0c46891bb0b74","versionType":"git"},{"version":"6.8.2","status":"affected","lessThan":"6.8.12","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/mana/cq.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.8.12","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9.3","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/mana/cq.c"]}],"references":["https://git.kernel.org/stable/c/f12afddfb142587d786df9e3cc4862190d3e2ec8","https://git.kernel.org/stable/c/168f6fbde0eabd71d1f4133df7d001a950b96977","https://git.kernel.org/stable/c/f79edef79b6a2161f4124112f9b0c46891bb0b74"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/38xxx/CVE-2024-38542.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-38542","state":"PUBLISHED","datePublished":"2024-06-19T13:35:17.310Z","dateUpdated":"2026-08-05T11:32:40.715Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-06-18T19:36:34.919Z"},"containers":{"cna":{"title":"RDMA/mana_ib: boundary check before installing cq callbacks","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mana_ib: boundary check before installing cq callbacks\n\nAdd a boundary check inside mana_ib_install_cq_cb to prevent index overflow."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"cf9cc859d6ff37ce52c09dfbb169b9ee25595a3f","status":"affected","lessThan":"f12afddfb142587d786df9e3cc4862190d3e2ec8","versionType":"git"},{"version":"2a31c5a7e0d87959a03e846523013c75f4395a91","status":"affected","lessThan":"168f6fbde0eabd71d1f4133df7d001a950b96977","versionType":"git"},{"version":"2a31c5a7e0d87959a03e846523013c75f4395a91","status":"affected","lessThan":"f79edef79b6a2161f4124112f9b0c46891bb0b74","versionType":"git"},{"version":"6.8.2","status":"affected","lessThan":"6.8.12","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/mana/cq.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.8.12","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9.3","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/mana/cq.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/f12afddfb142587d786df9e3cc4862190d3e2ec8"},{"url":"https://git.kernel.org/stable/c/168f6fbde0eabd71d1f4133df7d001a950b96977"},{"url":"https://git.kernel.org/stable/c/f79edef79b6a2161f4124112f9b0c46891bb0b74"}],"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 only from local userspace via write()/ioctl() on /dev/infiniband/uverbs* (ibv_create_qp with IB_QPT_RAW_PACKET), not from any network-facing handler. No remote peer data influences the path.\nAC:L - The attacker deterministically drives the code path by creating raw-packet QPs (including RSS QPs with a 64-entry indirection table, allocating many HW CQs per call), and the missing check fires on any device/host-returned cq_id outside [0, max_num_cqs) — including the INVALID_QUEUE_ID sentinel the sibling remove helper explicitly guards against; on a confidential/untrusted-host Azure VM the id is fully attacker-chosen.\nPR:L - An unprivileged local user with access to the RDMA uverbs device node and CAP_NET_RAW — routinely granted to non-root RDMA/HPC workloads and included in default container capability sets — can trigger it; consistent with the existing scoring of the identical mana_ib_create_qp_rss/install_cq_cb path (CVE-2026-46117, CVE-2026-46145).\nUI:N - Exploitation is entirely self-contained in the attacker's own QP-creation sequence; no victim action, mount, or file open is required.\nS:U - The out-of-bounds access corrupts kernel memory within the same kernel security authority; there is no hypervisor, IOMMU, or sandbox boundary crossed.\nC:H - `WARN_ON(gc->cq_table[cq->queue.id])` performs an unbounded out-of-bounds read past the vcalloc'd table, and the resulting kernel-memory corruption is leverageable for arbitrary kernel read, disclosing sensitive data and defeating KASLR.\nI:H - `gc->cq_table[cq->queue.id] = gdma_cq` is an out-of-bounds write of a valid kernel heap pointer at an unvalidated index, and the stale entry is never cleared on teardown (remove_cq_cb bails on its bound check), giving a persistent write primitive usable for control-flow hijack and privilege escalation.\nA:H - An index beyond the table lands in unmapped vmalloc guard pages or corrupts adjacent kernel structures, producing an oops/panic; the completion path later dereferences cq_table entries, so a corrupted entry crashes the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:32:40.715Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8.2","versionEndExcluding":"6.8.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.9.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.1,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-06-20T15:44:47.071270Z","id":"CVE-2024-38542","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-07T16:22:42.359Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/f12afddfb142587d786df9e3cc4862190d3e2ec8","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/168f6fbde0eabd71d1f4133df7d001a950b96977","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/f79edef79b6a2161f4124112f9b0c46891bb0b74","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:12:25.624Z"}}]}}}