Repository navigation
C++: Add initial libevent HTTP and buffer models - #23134
Draft
SkyCipherr wants to merge 1 commit into
Draft
SkyCipherr wants to merge 1 commit into
SkyCipherr wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #23110. This is the initial implementation invited in the maintainer's reply.
HTTP request contents passed to libevent server callbacks currently do not reach the existing command-injection query through URI and input-buffer access. This adds two source models for the request parameter of callbacks registered with
evhttp_set_cbandevhttp_set_gencb, and five taint summaries forevhttp_request_get_uri,evhttp_request_get_input_buffer,evbuffer_pullup,evbuffer_remove, andevbuffer_add.Request/buffer contents use one indirection in the models-as-data access paths. Getters and buffer operations propagate existing taint; locally constructed requests and buffers do not become unconditional remote sources. There is no request-content summary for the output-buffer getter.
The C++ tests also exposed a shared models-as-data callback-resolution gap: five expected paths were missed when registration used local function-pointer copies or wrapped callable expressions.
FlowSummaryImpl.qllnow follows reaching assignments through local pointer copies and recognizes function addresses, captureless lambdas, and unary-plus lambda conversions. The overwrite control ensures an overwritten target is not treated as registered; a copied pointer remains recognized after the original variable is cleared.Validation completed locally
release-2.1.12-stableheaders and the official Windows platform configuration, pinned to5df3037d10556bfcb675bc73e516978b75fc7bc7. The downloaded files were checked against Git blob hashes and SHA-256.cpp/command-line-injectionquery changes from 0 to exactly 3 expected alerts in intentionally unsafe synthetic C consumers; local request/buffer controls stay clear.git diff --checkpassed. AminorAnalysischange note is included.Current limitations / reason for draft