Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-17653: haproxy/template: mitigate CVE-2023-40225 #505

Merged
merged 1 commit into from Aug 15, 2023

Conversation

frobware
Copy link
Contributor

Mitigation rule taken from the HAProxy 2.6.15 release announcement:
https://www.mail-archive.com/haproxy@formilux.org/msg43864.html

And quoting from the release notes:

the check for invalid characters on content-length header values
doesn't reject empty headers, which can pass through. And since they
don't have a value, they're not merged with next ones, so it is
possible to pass a request that has both an empty content-length and
a populated one. Such requests are invalid and the vast majority of
servers will reject them. But there are certainly still a few
non-compliant servers that will only look at one of them,
considering the empty value equals zero and be fooled with this.
Thus the problem is not as much for mainstream users as for those
who develop their own HTTP stack or who purposely use haproxy to
protect a known-vulnerable server, because these ones may be at
risk. This issue was reported by Ben Kallus of Dartmouth College and
Narf Industries. A CVE was filed for this one. There is a
work-around, though: simply rejecting requests containing an empty
content-length header will do the job.

Mitigation rule taken from the HAProxy 2.6.15 release announcement:
https://www.mail-archive.com/haproxy@formilux.org/msg43864.html

And quoting from the release notes:

  the check for invalid characters on content-length header values
  doesn't reject empty headers, which can pass through. And since they
  don't have a value, they're not merged with next ones, so it is
  possible to pass a request that has both an empty content-length and
  a populated one. Such requests are invalid and the vast majority of
  servers will reject them. But there are certainly still a few
  non-compliant servers that will only look at one of them,
  considering the empty value equals zero and be fooled with this.
  Thus the problem is not as much for mainstream users as for those
  who develop their own HTTP stack or who purposely use haproxy to
  protect a known-vulnerable server, because these ones may be at
  risk. This issue was reported by Ben Kallus of Dartmouth College and
  Narf Industries. A CVE was filed for this one. There is a
  work-around, though: simply rejecting requests containing an empty
  content-length header will do the job.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 15, 2023
@openshift-ci-robot
Copy link
Contributor

@frobware: This pull request references Jira Issue OCPBUGS-17653, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @ShudiLi

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Mitigation rule taken from the HAProxy 2.6.15 release announcement:
https://www.mail-archive.com/haproxy@formilux.org/msg43864.html

And quoting from the release notes:

the check for invalid characters on content-length header values
doesn't reject empty headers, which can pass through. And since they
don't have a value, they're not merged with next ones, so it is
possible to pass a request that has both an empty content-length and
a populated one. Such requests are invalid and the vast majority of
servers will reject them. But there are certainly still a few
non-compliant servers that will only look at one of them,
considering the empty value equals zero and be fooled with this.
Thus the problem is not as much for mainstream users as for those
who develop their own HTTP stack or who purposely use haproxy to
protect a known-vulnerable server, because these ones may be at
risk. This issue was reported by Ben Kallus of Dartmouth College and
Narf Industries. A CVE was filed for this one. There is a
work-around, though: simply rejecting requests containing an empty
content-length header will do the job.

Instructions 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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Aug 15, 2023
@frobware
Copy link
Contributor Author

/assign @Miciah @gcs278

@Miciah
Copy link
Contributor

Miciah commented Aug 15, 2023

Thanks!
/approve
/lgtm

/hold
for Grant's review.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 15, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miciah

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. labels Aug 15, 2023
@gcs278
Copy link
Contributor

gcs278 commented Aug 15, 2023

Looks good.
/lgtm
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 15, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 15, 2023

@frobware: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-metal-ipi-ovn-ipv6 90966d7 link false /test e2e-metal-ipi-ovn-ipv6

Full PR test history. Your PR dashboard.

Instructions 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. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 80e2d99 into openshift:master Aug 15, 2023
7 of 8 checks passed
@Miciah
Copy link
Contributor

Miciah commented Aug 15, 2023

/cherry-pick release-4.13

@openshift-ci-robot
Copy link
Contributor

@frobware: Jira Issue OCPBUGS-17653: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-17653 has been moved to the MODIFIED state.

In response to this:

Mitigation rule taken from the HAProxy 2.6.15 release announcement:
https://www.mail-archive.com/haproxy@formilux.org/msg43864.html

And quoting from the release notes:

the check for invalid characters on content-length header values
doesn't reject empty headers, which can pass through. And since they
don't have a value, they're not merged with next ones, so it is
possible to pass a request that has both an empty content-length and
a populated one. Such requests are invalid and the vast majority of
servers will reject them. But there are certainly still a few
non-compliant servers that will only look at one of them,
considering the empty value equals zero and be fooled with this.
Thus the problem is not as much for mainstream users as for those
who develop their own HTTP stack or who purposely use haproxy to
protect a known-vulnerable server, because these ones may be at
risk. This issue was reported by Ben Kallus of Dartmouth College and
Narf Industries. A CVE was filed for this one. There is a
work-around, though: simply rejecting requests containing an empty
content-length header will do the job.

Instructions 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.

@openshift-cherrypick-robot

@Miciah: new pull request created: #506

In response to this:

/cherry-pick release-4.13

Instructions 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.

@openshift-cherrypick-robot

@Miciah: new pull request could not be created: failed to create pull request against openshift/router#release-4.13 from head openshift-cherrypick-robot:cherry-pick-505-to-release-4.13: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for openshift-cherrypick-robot:cherry-pick-505-to-release-4.13."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

In response to this:

/cherry-pick release-4.13

Instructions 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.

@Miciah
Copy link
Contributor

Miciah commented Aug 15, 2023

/cherry-pick release-4.12

@openshift-cherrypick-robot

@Miciah: new pull request created: #507

In response to this:

/cherry-pick release-4.12

Instructions 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.

@Miciah
Copy link
Contributor

Miciah commented Sep 2, 2023

/cherry-pick release-4.11

@openshift-cherrypick-robot

@Miciah: new pull request created: #509

In response to this:

/cherry-pick release-4.11

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants