Skip to content

Conversation

@IustinDumitru
Copy link

Implement graceful degradation when PBUF_POOL approaches exhaustion to prevent
resource exhaustion attacks and application deadlock in socket-based applications.

When enabled via LIMIT_PAYLOAD_THRESHOLD_ENABLE, the TCP stack drops incoming
payload (while still ACKing) when buffer pool usage is critical, reserving 2
buffers for essential control messages (SYN, FIN). This ensures the stack can
always process connection state changes even under memory pressure, preventing
situations where socket applications hang due to inability to receive control
messages needed to free resources.

Only active with Socket/Netconn API where payload queuing can cause deadlock.
Requires MEMP_STATS enabled for runtime buffer tracking.

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