Skip to content

Memory leak in modsecurity_request_body_to_stream() #2208

@marcstern

Description

@marcstern

msr->stream_input_data buffer is never unallocated, leading to a memory leak on each request.
We should use the request memory pool.
This needs passing the pool as parameter in modsecurity_request_body_to_stream() and in read_request_body(). The request memory pool is available when calling read_request_body() (in hook_request_late() ).

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.xRelated to ModSecurity version 2.x

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions