Skip to content

reject too-short PROXY v2 address length in mod_remoteip#683

Open
arshsmith1 wants to merge 1 commit into
apache:trunkfrom
arshsmith1:remoteip-v2-len-check
Open

reject too-short PROXY v2 address length in mod_remoteip#683
arshsmith1 wants to merge 1 commit into
apache:trunkfrom
arshsmith1:remoteip-v2-len-check

Conversation

@arshsmith1

Copy link
Copy Markdown

remoteip_process_v2_header only bounds the advertised v2 header length from above, so a peer sending a TCPv4 or TCPv6 family with a length shorter than its address block makes the code read past what was actually received from the uninitialized ctx->header buffer and adopt those bytes as the client IP used for logging and Require ip decisions. Reject the header when ntohs(hdr->v2.len) is smaller than the family address struct, matching the existing too-long check right beside it.

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