Skip to content

Conversation

@IustinDumitru
Copy link

This MR introduces a new configuration option DISABLE_TCPIP_EVENT_ACCEPT_AT_MEM_ERR to improve stack stability during PCB memory exhaustion scenarios, especially to SYN Storm test

Problem Statement
When the TCP stack exhausts available PCBs (reaches [MEMP_NUM_TCP_PCB], the current behavior calls [TCP_EVENT_ACCEPT] with ERR_MEM to notify the application layer. This can cause significant instability because:

Resource Exhaustion Feedback Loop: The stack is already at its resource limits, having attempted multiple recovery strategies (killing TIME-WAIT, LAST-ACK, CLOSING, and lower-priority connections)
An anormal behavior was noticed with an attempt to remove queues or blocking if application don't handle it.
Application-Layer Interference: The application may attempt connection or memory management operations during this critical state
Unnecessary Complexity: Applications that don't handle ERR_MEM in accept callbacks receive unexpected callbacks with no practical benefit

Security/Stability: Prevents instability during high connection load or resource exhaustion attacks or tests as TCP SYN stom

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