fix out-of-bounds read in extractIPFromForwardedHeader on empty for= token#1015
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: netliomax25-code The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @netliomax25-code. Thanks for your PR. I'm waiting for a GoogleCloudPlatform member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When the
Forwardedheader arrives asfor=(orfor=""),ipbecomes an emptyabsl::string_viewandip[0]/ip[ip.size() - 1]in handler_utils.cc:403-408 read out of bounds. Gate the unquote/unbracket steps onip.size() >= 2so the strip only runs when there is something to strip.