{"id":"CVE-2026-53187","state":"PUBLISHED","title":"RDMA/core: Validate cpu_id against nr_cpu_ids in DMAH alloc","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/core: Validate cpu_id against nr_cpu_ids in DMAH alloc\n\nThe cpu_id attribute supplied by user space through\nUVERBS_ATTR_ALLOC_DMAH_CPU_ID is passed directly to cpumask_test_cpu()\nwithout first verifying that the value is within the valid CPU range.\n\nPassing such untrusted data to cpumask_test_cpu() may lead to an\nout-of-bounds read of the underlying cpumask bitmap: the helper expands\nto a test_bit() that indexes the bitmap by cpu_id / BITS_PER_LONG with\nno bound check.\n\nIn addition, on kernels built with CONFIG_DEBUG_PER_CPU_MAPS it trips\nthe WARN_ON_ONCE() in cpumask_check(); combined with panic_on_warn this\nturns a bad user input into a machine reboot.\n\nReject any cpu_id that is not smaller than nr_cpu_ids with -EINVAL\nbefore it is used.\n\nReported by Smatch.","publishedAt":"2026-06-25T08:39:00.175Z","updatedAt":"2026-10-19T19:57:27.163Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d83edab562a496a42720902a1d2effccd05c37c5","status":"affected","lessThan":"bd5e818be7964c1689fba2dad9e6bd3a827fee74","versionType":"git"},{"version":"d83edab562a496a42720902a1d2effccd05c37c5","status":"affected","lessThan":"0efbb6b54ff56300867027d8e0800d0e32226a20","versionType":"git"},{"version":"d83edab562a496a42720902a1d2effccd05c37c5","status":"affected","lessThan":"323c98a4ff06aa28114f2bf658fb43eb3b536bbc","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/core/uverbs_std_types_dmah.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.36","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.13","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/core/uverbs_std_types_dmah.c"]}],"references":["https://git.kernel.org/stable/c/bd5e818be7964c1689fba2dad9e6bd3a827fee74","https://git.kernel.org/stable/c/0efbb6b54ff56300867027d8e0800d0e32226a20","https://git.kernel.org/stable/c/323c98a4ff06aa28114f2bf658fb43eb3b536bbc"],"weaknesses":["CWE-125"],"ingestedAt":"2026-10-29T20:12:16.098Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/53xxx/CVE-2026-53187.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-53187","state":"PUBLISHED","datePublished":"2026-06-25T08:39:00.175Z","dateUpdated":"2026-10-19T19:57:27.163Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-06-09T07:44:35.390Z"},"containers":{"cna":{"title":"RDMA/core: Validate cpu_id against nr_cpu_ids in DMAH alloc","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/core: Validate cpu_id against nr_cpu_ids in DMAH alloc\n\nThe cpu_id attribute supplied by user space through\nUVERBS_ATTR_ALLOC_DMAH_CPU_ID is passed directly to cpumask_test_cpu()\nwithout first verifying that the value is within the valid CPU range.\n\nPassing such untrusted data to cpumask_test_cpu() may lead to an\nout-of-bounds read of the underlying cpumask bitmap: the helper expands\nto a test_bit() that indexes the bitmap by cpu_id / BITS_PER_LONG with\nno bound check.\n\nIn addition, on kernels built with CONFIG_DEBUG_PER_CPU_MAPS it trips\nthe WARN_ON_ONCE() in cpumask_check(); combined with panic_on_warn this\nturns a bad user input into a machine reboot.\n\nReject any cpu_id that is not smaller than nr_cpu_ids with -EINVAL\nbefore it is used.\n\nReported by Smatch."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d83edab562a496a42720902a1d2effccd05c37c5","status":"affected","lessThan":"bd5e818be7964c1689fba2dad9e6bd3a827fee74","versionType":"git"},{"version":"d83edab562a496a42720902a1d2effccd05c37c5","status":"affected","lessThan":"0efbb6b54ff56300867027d8e0800d0e32226a20","versionType":"git"},{"version":"d83edab562a496a42720902a1d2effccd05c37c5","status":"affected","lessThan":"323c98a4ff06aa28114f2bf658fb43eb3b536bbc","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/core/uverbs_std_types_dmah.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.36","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.13","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/core/uverbs_std_types_dmah.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/bd5e818be7964c1689fba2dad9e6bd3a827fee74"},{"url":"https://git.kernel.org/stable/c/0efbb6b54ff56300867027d8e0800d0e32226a20"},{"url":"https://git.kernel.org/stable/c/323c98a4ff06aa28114f2bf658fb43eb3b536bbc"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is reached by a local RDMA uverbs ioctl on /dev/infiniband/uverbsN, specifically RDMA_VERBS_IOCTL selecting UVERBS_METHOD_DMAH_ALLOC. It is not exposed by incoming network packets or remote RDMA traffic.\nAC:L - An attacker can supply an out-of-range UVERBS_ATTR_ALLOC_DMAH_CPU_ID directly in one ioctl, with no race or victim-controlled timing requirement. The only deployment prerequisite is an affected RDMA device exposing the DMAH uverbs method.\nPR:L - The uverbs ioctl path has no CAP_* check for DMAH allocation, and RDMA uverbs devices are designed to be usable by non-root users when the device node is accessible. This requires local low-privileged access rather than real administrator privileges.\nUI:N - No victim action is needed after the attacker has local access to the uverbs device. The attacker triggers the bug directly through the ioctl.\nS:U - The bug affects kernel RDMA/core processing within the same host kernel security authority. It does not cross a VM, IOMMU, or separate authorization boundary.\nC:H - The unchecked cpu_id is passed to cpumask_test_cpu(), which expands to test_bit() on current->cpus_ptr without a bounds check, creating an out-of-bounds kernel memory read. The result influences the returned error/path, making a kernel memory bit oracle defensible.\nI:N - The identified primitive is an out-of-bounds read of a cpumask bitmap and no kernel out-of-bounds write or control-flow corruption was found on the traced path. Passing the value onward only affects TPH steering-tag allocation if the read happens to pass.\nA:H - Large invalid cpu_id values can trigger CONFIG_DEBUG_PER_CPU_MAPS WARN_ON_ONCE(), and with panic_on_warn this reboots the machine. The same unchecked test_bit() can also fault from an out-of-bounds kernel read, making kernel oops/panic availability impact defensible."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:33:54.299Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.18.36"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.0.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-53187","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-10-16T15:26:25.299167Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-125","lang":"en","type":"CWE","description":"CWE-125 Out-of-bounds Read"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T19:57:27.163Z"}}]}}}