CVE-2026-100075 PUBLISHED

RDMA/srpt: Fix srpt_alloc_rw_ctxs() unwind counters

Assigner: Linux
Reserved: 25.09.2026 Published: 25.09.2026 Updated: 25.09.2026

In the Linux kernel, the following vulnerability has been resolved:

RDMA/srpt: Fix srpt_alloc_rw_ctxs() unwind counters

When srpt_alloc_rw_ctxs() fails partway through a multi-buffer indirect descriptor, the unwind path destroys RDMA contexts but leaves stale n_rw_ctx and n_rdma values (and a dangling rw_ctxs pointer). Later sq_wr_avail accounting in srpt_queue_response() or srpt_write_pending() can then subtract the wrong number of send queue credits.

Reset the counters and clear rw_ctxs after freeing the heap allocation before returning an error.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8

AV:N - The descriptor table that makes srpt_alloc_rw_ctxs() fail partway (idb->desc_list entries, table_desc.len, data_out/in_desc_cnt) comes in a remote initiator's SRP_CMD IU. The path is srpt_recv_done->srpt_handle_new_iu->srpt_handle_cmd->srpt_get_desc_tbl, and srpt also accepts logins through its RDMA-CM listener, which runs over routable RoCEv2 (UDP/IP). AC:L - The initiator picks the failure point: a small first descriptor followed by one with db->len=0xFFFFFFFF, whose scatterlist array is too big for sgl_alloc_order() to allocate. target_alloc_sgl() then fails at i>=1 every time, leaving n_rw_ctx>=1 and a dangling rw_ctxs. No race or outside state is needed. PR:N - SRP login (srpt_cm_req_recv) has no authentication. It only compares the initiator port ID that the initiator itself claims against the configured ACL, and the malformed SRP_CMD is parsed right after login. UI:N - The initiator sends the malformed SRP_CMD over its own channel, and no action by the target's administrator or any user is needed. S:U - The use-after-free and crash happen in the target host's kernel, which is the same security authority that runs ib_srpt. No VM or IOMMU boundary is crossed. C:H - In kernels from v4.7 up to v5.1, srpt_handle_cmd's release_ioctx path calls srpt_release_cmd(). Because n_rw_ctx is stale, srpt_free_rw_ctxs() reads the kfree'd rw_ctxs array, a use-after-free on a slab object the attacker can reclaim. I:H - The same srpt_free_rw_ctxs() pass calls rdma_rw_ctx_destroy() and target_free_sgl() again on ctx->sg lists the unwind loop already freed. That is a double free of the scatterlists and their data pages, a memory-corruption primitive. A:H - Each malformed SRP_CMD can be repeated at will and corrupts the heap (UAF plus double free) on older kernels. On newer kernels the busy path reached after this failure crashes the target, so any initiator can repeatedly take down the SRP target host.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from b99f8e4d7bcd3bfbb3cd965918523299370d0cb2 to af00051dbc9f467d4840ec709680660a3f8990fa (excl.)
  • affected from b99f8e4d7bcd3bfbb3cd965918523299370d0cb2 to 717ab4d0614e9446bf8e2de6229464499e4008d6 (excl.)
  • affected from b99f8e4d7bcd3bfbb3cd965918523299370d0cb2 to f1f2252da52cdda912da9993f39f58783b01b38f (excl.)
  • affected from b99f8e4d7bcd3bfbb3cd965918523299370d0cb2 to f65f45dfa1e6e2eaa9e11c8b8ce8857799cb189d (excl.)
  • affected from b99f8e4d7bcd3bfbb3cd965918523299370d0cb2 to be1478849e1abb1e12dc12e14cdbf800cc6fa99a (excl.)
  • affected from b99f8e4d7bcd3bfbb3cd965918523299370d0cb2 to af073bd245180393bcb15d33d3990a6bdc32593a (excl.)
  • affected from b99f8e4d7bcd3bfbb3cd965918523299370d0cb2 to bd02d644bd19a2795c018635d273d91e45d2bb95 (excl.)
  • affected from b99f8e4d7bcd3bfbb3cd965918523299370d0cb2 to b38f98e176050850f41bb6415f3a71400056623e (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 4.7 is affected
  • unaffected from 0 to 4.7 (excl.)
  • unaffected from 5.10.270 to 5.10.* (incl.)
  • unaffected from 5.15.221 to 5.15.* (incl.)
  • unaffected from 6.1.188 to 6.1.* (incl.)
  • unaffected from 6.6.157 to 6.6.* (incl.)
  • unaffected from 6.12.110 to 6.12.* (incl.)
  • unaffected from 6.18.52 to 6.18.* (incl.)
  • unaffected from 7.2.6 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References