httputil: ResponseChain can exhaust or deadlock the buffer pool #799
Copy link
Copy link
Closed
Labels
Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.
Description
ResponseChain can block forever on the httputil buffer pool:
NewResponseChaintakes its two buffers one at a time. With N concurrent chains on an N-slot pool, each holds one slot and waits for the second.FullResponse()takes a third pooled buffer that external callers cannot return (putBufferis unexported), so every call leaks a slot until the pool is exhausted. Used by proxify and nuclei-internal-dast.
Surfaced in #793 (TestResponseChain_BurstWithPoolExhaustion hung once pool shrinking actually worked).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.
Activity