{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-40990","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-07-12T12:17:45.605Z","datePublished":"2024-07-12T12:37:34.485Z","dateUpdated":"2026-08-05T11:34:28.146Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:34:28.146Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Add check for srq max_sge attribute\n\nmax_sge attribute is passed by the user, and is inserted and used\nunchecked, so verify that the value doesn't exceed maximum allowed value\nbefore using 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 only through the local uverbs character device `/dev/infiniband/uverbsN` via the CREATE_SRQ/CREATE_XSRQ ioctl-style command; there is no path from a remote RDMA peer or network packet into `mlx5_ib_create_srq()` with an attacker-chosen `max_sge`.\nAC:L - The attacker fully controls `max_sge` (a raw `__u32` copied from the uverbs command with no core-layer validation) and `max_wr`, so the oversized `desc_size`/`wqe_shift`, the truncated firmware `log_rq_stride` field, and the undersized PAS computation are produced deterministically on the first attempt with no race or layout dependency.\nPR:L - `uverbs_devnode()` makes `/dev/infiniband/uverbs*` mode 0666 in the kernel itself, and allocating a PD plus creating an SRQ requires no capability (only a non-zero default `RLIMIT_MEMLOCK` for `ib_umem_get()`), so any unprivileged local user — including one inside a container with the RDMA device exposed — can trigger it.\nUI:N - The attacker performs the entire sequence (open uverbs device, alloc PD, create SRQ) itself; no action by any other user or administrator is needed.\nS:U - The corruption and its consequences are confined to the kernel's own security authority on the same host; no VM, IOMMU, or sandbox boundary is crossed by the flaw itself.\nC:H - The unchecked value undersizes the `kvzalloc()`'d CREATE_SRQ mailbox and its PAS array while `mlx5_ib_populate_pas()` is bounded only by the umem block count, and it desynchronizes the firmware's WQ geometry from the kernel's — memory corruption of this kind is leverageable for kernel heap disclosure, and on branches lacking the `WARN_ON` guard the device is handed a truncated physical-address list to DMA against.\nI:H - The same undersized-PAS / out-of-bounds descriptor-write condition yields a kernel heap write primitive, and the truncated `log_rq_stride`/`log_wq_stride` firmware fields let the NIC operate on a work queue whose stride and extent disagree with the memory actually registered for it, giving attacker-influenced writes.\nA:H - The path reliably produces a user-triggerable `WARN_ON()` in `__set_srq_page_size()` and a shift-out-of-bounds in `get_pas_size()` (kernel panic under `panic_on_warn` or UBSAN trap), and feeding the ConnectX firmware an inconsistent WQ geometry can drive the device into a fatal/health-recovery state that takes down all traffic on the adapter."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/mlx5/srq.c"],"versions":[{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","lessThan":"7186b81c1f15e39069b1af172c6a951728ed3511","status":"affected","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","lessThan":"1e692244bf7dd827dd72edc6c4a3b36ae572f03c","status":"affected","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","lessThan":"999586418600b4b3b93c2a0edd3a4ca71ee759bf","status":"affected","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","lessThan":"e0deb0e9c967b61420235f7f17a4450b4b4d6ce2","status":"affected","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","lessThan":"4ab99e3613139f026d2d8ba954819e2876120ab3","status":"affected","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","lessThan":"36ab7ada64caf08f10ee5a114d39964d1f91e81d","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/mlx5/srq.c"],"versions":[{"version":"3.11","status":"affected"},{"version":"0","lessThan":"3.11","status":"unaffected","versionType":"semver"},{"version":"5.10.221","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.162","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.96","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.36","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.9.7","lessThanOrEqual":"6.9.*","status":"unaffected","versionType":"semver"},{"version":"6.10","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":"3.11","versionEndExcluding":"5.10.221"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.11","versionEndExcluding":"5.15.162"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.11","versionEndExcluding":"6.1.96"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.11","versionEndExcluding":"6.6.36"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.11","versionEndExcluding":"6.9.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.11","versionEndExcluding":"6.10"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/7186b81c1f15e39069b1af172c6a951728ed3511"},{"url":"https://git.kernel.org/stable/c/1e692244bf7dd827dd72edc6c4a3b36ae572f03c"},{"url":"https://git.kernel.org/stable/c/999586418600b4b3b93c2a0edd3a4ca71ee759bf"},{"url":"https://git.kernel.org/stable/c/e0deb0e9c967b61420235f7f17a4450b4b4d6ce2"},{"url":"https://git.kernel.org/stable/c/4ab99e3613139f026d2d8ba954819e2876120ab3"},{"url":"https://git.kernel.org/stable/c/36ab7ada64caf08f10ee5a114d39964d1f91e81d"}],"title":"RDMA/mlx5: Add check for srq max_sge attribute","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/7186b81c1f15e39069b1af172c6a951728ed3511","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1e692244bf7dd827dd72edc6c4a3b36ae572f03c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/999586418600b4b3b93c2a0edd3a4ca71ee759bf","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e0deb0e9c967b61420235f7f17a4450b4b4d6ce2","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/4ab99e3613139f026d2d8ba954819e2876120ab3","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/36ab7ada64caf08f10ee5a114d39964d1f91e81d","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T21:58:55.239Z"}},{"metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-40990","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T17:01:51.391484Z"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-09-11T17:34:20.373Z"}}]}}