Mooncake/mooncake-transfer-engine
Jiangtian Feng 9153043b86
[TE] Harden TCP transport: validate remote addresses, fix idle cleanup, add TCP_NODELAY (#2314)
* [TE] Harden TCP transport: validate remote addresses, fix idle cleanup, add TCP_NODELAY

Fixes #2313

1. Security: ServerSession now validates remote-supplied memory addresses
   against registered local buffers before use, preventing arbitrary
   memory read/write from malicious peers.

2. Performance: Set TCP_NODELAY on all server-accept and client-connect
   paths to eliminate Nagle-induced latency on small control messages.

3. Correctness: Call io_context.restart() after exception in worker loop
   to prevent busy-spin when io_context enters stopped state.

4. Correctness: Fix cleanupIdleConnections to scan the full deque instead
   of only the back, so idle connections anywhere in the pool get cleaned.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [TE] Fix clang-format violations in TCP transport

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-08 10:29:09 +08:00
..
benchmark [Build] Allow building tebench without USE_TENT (#2322) 2026-06-04 10:00:08 +08:00
example [TE] add device API support (#2333) 2026-06-05 16:00:07 +08:00
include [TE] Harden TCP transport: validate remote addresses, fix idle cleanup, add TCP_NODELAY (#2314) 2026-06-08 10:29:09 +08:00
nvlink-allocator [CI/Build] Switch WITH_NVIDIA_PEERMEM to env variable (#2066) 2026-05-20 10:05:21 +08:00
rust fix(transfer-engine): add missing empty checks for batch methods (#2046) 2026-05-07 16:00:54 +08:00
scripts refactor: unify fabric allocator plumbing (#2028) 2026-05-06 10:13:37 +08:00
src [TE] Harden TCP transport: validate remote addresses, fix idle cleanup, add TCP_NODELAY (#2314) 2026-06-08 10:29:09 +08:00
tent [TENT] Validate minimum request size before XferDataDesc cast (#2351) 2026-06-08 09:49:51 +08:00
tests [TE] Harden TCP transport: validate remote addresses, fix idle cleanup, add TCP_NODELAY (#2314) 2026-06-08 10:29:09 +08:00
ubshmem-allocator refactor: unify fabric allocator plumbing (#2028) 2026-05-06 10:13:37 +08:00
CMakeLists.txt [Build] Allow building tebench without USE_TENT (#2322) 2026-06-04 10:00:08 +08:00
fabric_allocator.cmake Build tent (#2089) 2026-05-28 20:30:20 +08:00