Skip to content

Conversation

@edsiper
Copy link
Member

@edsiper edsiper commented Feb 20, 2025

backport of #9970


Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

niedbalski and others added 7 commits February 20, 2025 13:48
When buffer reallocation occurs in HTTP/1.1 connections, parsed header
references become invalid since they point to locations in the old buffer.
This causes memory corruption and crashes when later accessing those headers.

Add splunk_conn_realloc_and_reparse() function that:
- Performs buffer reallocation
- Resets parser state
- Reinitializes HTTP session and request

This ensures no dangling pointers exist after reallocation, preventing
crashes at the cost of reparsing. A proper fix using offsets instead of
pointers will be implemented in mk_http_parser in a future change.

Fixes #9964

Signed-off-by: Jorge Niedbalski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants