{"id":"CVE-2024-26872","state":"PUBLISHED","title":"RDMA/srpt: Do not register event handler until srpt device is fully setup","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/srpt: Do not register event handler until srpt device is fully setup\n\nUpon rare occasions, KASAN reports a use-after-free Write\nin srpt_refresh_port().\n\nThis seems to be because an event handler is registered before the\nsrpt device is fully setup and a race condition upon error may leave a\npartially setup event handler in place.\n\nInstead, only register the event handler after srpt device initialization\nis complete.","publishedAt":"2024-04-17T10:27:32.025Z","updatedAt":"2026-10-15T00:38:56.707Z","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":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"bdd895e0190c464f54f84579e7535d80276f0fc5","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"6413e78086caf7bf15639923740da0d91fdfd090","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"e362d007294955a4fb929e1c8978154a64efdcb6","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"85570b91e4820a0db9d9432098778cafafa7d217","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"7104a00fa37ae898a827381f1161fa3286c8b346","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"ec77fa12da41260c6bf9e060b89234b980c5130f","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"c21a8870c98611e8f892511825c9607f1e2cd456","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/ulp/srpt/ib_srpt.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.3","versionType":"semver"},{"version":"5.10.214","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.153","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.83","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.23","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.11","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8.2","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/ulp/srpt/ib_srpt.c"]}],"references":["https://git.kernel.org/stable/c/bdd895e0190c464f54f84579e7535d80276f0fc5","https://git.kernel.org/stable/c/6413e78086caf7bf15639923740da0d91fdfd090","https://git.kernel.org/stable/c/e362d007294955a4fb929e1c8978154a64efdcb6","https://git.kernel.org/stable/c/85570b91e4820a0db9d9432098778cafafa7d217","https://git.kernel.org/stable/c/7104a00fa37ae898a827381f1161fa3286c8b346","https://git.kernel.org/stable/c/ec77fa12da41260c6bf9e060b89234b980c5130f","https://git.kernel.org/stable/c/c21a8870c98611e8f892511825c9607f1e2cd456","https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","https://cert-portal.siemens.com/productcert/html/ssa-265688.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/26xxx/CVE-2024-26872.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-26872","state":"PUBLISHED","datePublished":"2024-04-17T10:27:32.025Z","dateUpdated":"2026-10-15T00:38:56.707Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-19T14:20:24.184Z"},"containers":{"cna":{"title":"RDMA/srpt: Do not register event handler until srpt device is fully setup","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/srpt: Do not register event handler until srpt device is fully setup\n\nUpon rare occasions, KASAN reports a use-after-free Write\nin srpt_refresh_port().\n\nThis seems to be because an event handler is registered before the\nsrpt device is fully setup and a race condition upon error may leave a\npartially setup event handler in place.\n\nInstead, only register the event handler after srpt device initialization\nis complete."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"bdd895e0190c464f54f84579e7535d80276f0fc5","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"6413e78086caf7bf15639923740da0d91fdfd090","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"e362d007294955a4fb929e1c8978154a64efdcb6","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"85570b91e4820a0db9d9432098778cafafa7d217","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"7104a00fa37ae898a827381f1161fa3286c8b346","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"ec77fa12da41260c6bf9e060b89234b980c5130f","versionType":"git"},{"version":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","status":"affected","lessThan":"c21a8870c98611e8f892511825c9607f1e2cd456","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/ulp/srpt/ib_srpt.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.3","versionType":"semver"},{"version":"5.10.214","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.153","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.83","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.23","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.11","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8.2","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/ulp/srpt/ib_srpt.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/bdd895e0190c464f54f84579e7535d80276f0fc5"},{"url":"https://git.kernel.org/stable/c/6413e78086caf7bf15639923740da0d91fdfd090"},{"url":"https://git.kernel.org/stable/c/e362d007294955a4fb929e1c8978154a64efdcb6"},{"url":"https://git.kernel.org/stable/c/85570b91e4820a0db9d9432098778cafafa7d217"},{"url":"https://git.kernel.org/stable/c/7104a00fa37ae898a827381f1161fa3286c8b346"},{"url":"https://git.kernel.org/stable/c/ec77fa12da41260c6bf9e060b89234b980c5130f"},{"url":"https://git.kernel.org/stable/c/c21a8870c98611e8f892511825c9607f1e2cd456"}],"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 race is driven through local interfaces — RDMA netlink `RDMA_NLDEV_CMD_NEWLINK` to register an IB device (triggering `srpt_add_one`) and netdev up/down to dispatch the async IB port events. No remote packet processing is involved in reaching the vulnerable window.\nAC:L - The attacker controls both sides of the race: repeated `rdma link add`/`del` of soft-RoCE devices re-enters `srpt_add_one()` at will, while concurrent netdev link flaps generate `IB_EVENT_PORT_ACTIVE`/`IB_EVENT_PORT_ERR` inside the unprotected window, and keeping the netdev down makes `rdma_query_gid()` fail to force the `err_port` free path.\nPR:L - `nldev_newlink` is gated only by `netlink_capable(skb, CAP_NET_ADMIN)`, which resolves against the netns-owning user namespace, so an unprivileged user satisfies it via `unshare -Urn`; RDMA_NL_NLDEV is explicitly allowed in non-init net namespaces and `rxe_newlink()` adds no further restriction.\nUI:N - The attacker triggers device registration and the async IB events entirely from their own processes; no action by any other user or administrator is required.\nS:U - The corruption is confined to kernel slab memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The use-after-free on the freed `srpt_device`/`srpt_port` allocation lets the attacker reclaim the slab object with a chosen structure, turning the stale `sport` reference into a means of reading and disclosing arbitrary kernel memory.\nI:H - `srpt_refresh_port()` writes into the freed object — `sm_lid`, `lid`, a 16-byte `gid`, and two `snprintf()`-formatted strings — giving a multi-byte write into attacker-sprayed heap memory that can corrupt adjacent kernel structures and be leveraged for control-flow hijacking.\nA:H - Both failure modes crash the kernel: `schedule_work()` on a zeroed `work_struct` makes the kworker call a NULL `work->func`, and the use-after-free write reliably produces oopses/panics."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:28:03.037Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"5.10.214"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"5.15.153"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.1.83"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.6.23"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.7.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.8.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-26872","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-05-28T19:53:54.471645Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:48:33.197Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/bdd895e0190c464f54f84579e7535d80276f0fc5","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/6413e78086caf7bf15639923740da0d91fdfd090","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e362d007294955a4fb929e1c8978154a64efdcb6","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/85570b91e4820a0db9d9432098778cafafa7d217","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/7104a00fa37ae898a827381f1161fa3286c8b346","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/ec77fa12da41260c6bf9e060b89234b980c5130f","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/c21a8870c98611e8f892511825c9607f1e2cd456","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T00:21:04.204Z"}},{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"V1.1.1","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T00:38:56.707Z"},"x_adpType":"supplier"}]}}}