Repository navigation
UCT/TCP: Validate AM receive length - v1.23.x - #12124
Conversation
* UCT/TCP: Validate AM receive length Validate wire-provided AM lengths at runtime before retaining the header for a later receive. Disconnect peers that advertise a payload larger than the configured receive segment.\n\nAdd a raw TCP regression that sends the protocol magic and an oversized AM header. * UCT/TCP: Improve oversized AM diagnostics Report rejected oversized messages at diagnostic level and use a compile-time constant for the TCP magic value in the regression test. * UCT/TCP: Reuse maximum AM length (cherry picked from commit 413775a)
|
🤖 Starting review — findings will be posted here when done. |
| setup_conns_to_entity(*m_ent, 1, fds); | ||
| post_send(fds.front(), buf); | ||
|
|
||
| wait_for_cond([this]() { |
There was a problem hiding this comment.
Minor: pls use the default timeout, 1 sec can be flaky on a loaded CI machine.
| wait_for_cond([this]() { | |
| wait_for_cond([this]() { | |
| return ucs_list_is_empty(&m_tcp_iface->ep_list); | |
| }, | |
| [this]() { progress(); }); |
|
Coverage gap to note: the test only asserts that the EP is destroyed; it does not exercise the overflow scenario itself (a peer streaming more than Note: I could not read the existing PR discussion or CI state with the tools available here, so please de-duplicate these two comments against any unresolved threads (and |
What?
Backport #12081 to
v1.23.x.Validate TCP active-message receive lengths at runtime and disconnect a peer when its advertised payload is larger than the receive segment. Include the focused raw TCP regression from the original change.
Why?
The receive path previously relied on an assertion for this wire-input invariant. Assertions are disabled in release builds, so an invalid length could be retained and used later.