Skip to content

fix: validate atomic target addr against heap range in proxy DrainCq - #23

Merged
itej89 merged 1 commit into
feat/ep-rdma-sharingfrom
feat/ep-rdma-sharing-fix-r2-1-bounds
Aug 28, 2026
Merged

fix: validate atomic target addr against heap range in proxy DrainCq#23
itej89 merged 1 commit into
feat/ep-rdma-sharingfrom
feat/ep-rdma-sharing-fix-r2-1-bounds

Conversation

@itej89

@itej89 itej89 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses PR ROCm#558 round-2 review comment R2-1.

Native IBV_WR_ATOMIC_FETCH_AND_ADD validates the target address via the MR rkey. The SEND_WITH_IMM emulation drops that — the CPU does an atomic wherever the payload points, so wire corruption becomes an arbitrary write.

Fix: pass heapBaseAddr/heapEndAddr from GpuStates into ProxyThread::Init and reject payload.addr outside [heapBase, heapEnd) in DrainCq. When heap range is not set (both zero), the check is skipped for backward compatibility.

Test plan

  • EP benchmark on DO AINIC: Dispatch Pass, Combine Pass
  • Dispatch avg 33.67 GB/s, Combine avg 54.03 GB/s (consistent)

🤖 Generated with Claude Code

Native IBV_WR_ATOMIC_FETCH_AND_ADD validates the target address via
the MR rkey. The SEND_WITH_IMM emulation drops that — the CPU does
an atomic wherever the payload points, so wire corruption becomes an
arbitrary write.

Pass heapBaseAddr/heapEndAddr from GpuStates into ProxyThread::Init
and reject payload.addr outside [heapBase, heapEnd) in DrainCq.

Addresses PR ROCm#558 round-2 review comment R2-1.

Co-Authored-By: Claude <noreply@anthropic.com>
@itej89
itej89 merged commit ebf8bf8 into feat/ep-rdma-sharing Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant