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

FISH-9690: adding new version of grizzly to validate headers RFC-9110 #7060

Conversation

breakponchito
Copy link
Contributor

@breakponchito breakponchito commented Nov 12, 2024

Adding Header validation for RFC-9110

Description

This is a security fix to prevent issues based on CVE reported here: [CVE-2024-45687](https://www.cve.org/CVERecord?id=CVE-2024-45687) and here glassfish issue

Important Info

Blockers

Testing

New tests

Manual testing:

Testing Performed

To test this set the dependency version on the payara server: 4.0.0.payara-p2 build and run
deploy the following reproducer:
ReproducerJDK11.zip

By default grizzly is setting two new properties that enable the validation of the headers by default. You can customize this behavior by seeting the following properties from UI or by cli command o directly on the domain.xml file

  • -Dorg.glassfish.grizzly.http.STRICT_HEADER_NAME_VALIDATION_RFC_9110=true
  • -Dorg.glassfish.grizzly.http.STRICT_HEADER_VALUE_VALIDATION_RFC_9110=true

image

image

asadmin create-jvm-options --target=server-config "-Dorg.glassfish.grizzly.http.STRICT_HEADER_NAME_VALIDATION_RFC_9110\=true"

asadmin create-jvm-options --target=server-config "-Dorg.glassfish.grizzly.http.STRICT_HEADER_VALUE_VALIDATION_RFC_9110\=true"

after adding the properties you need to restart the server

by default on the grizzly side those properties are set as true

deploy the reproducer and make curl calls

Header Name Validation tests:

the result of any of those test should be error 400:
image

this will return status 200 but the header will be discarted because of the \0 character

image

Header Value Validations tests:

The \0 is immediately not processed from curl because by default we can't consider that character on the request headers and the the \r and \n characters are not permitted alone on the header value content

Testing Environment

Windows 11, Azul jdk 11, maven 3.9.5

Documentation

working on documentation

Notes for Reviewers

@breakponchito breakponchito added the PR: DO NOT MERGE Don't merge PR until further notice label Nov 12, 2024
@breakponchito
Copy link
Contributor Author

this depend of the following PR: payara/patched-src-grizzly#39

@breakponchito
Copy link
Contributor Author

Jenkins test please

5 similar comments
@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito
Copy link
Contributor Author

Jenkins test please

core/core-parent/pom.xml Outdated Show resolved Hide resolved
@breakponchito
Copy link
Contributor Author

Jenkins test please

core/pom.xml Outdated Show resolved Hide resolved
@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito breakponchito removed the PR: DO NOT MERGE Don't merge PR until further notice label Dec 12, 2024
@breakponchito
Copy link
Contributor Author

Jenkins test please

1 similar comment
@breakponchito
Copy link
Contributor Author

Jenkins test please

Copy link
Contributor

@luiseufrasio luiseufrasio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor Author

@breakponchito breakponchito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@breakponchito breakponchito merged commit 924596d into payara:main Dec 16, 2024
1 check passed
Pandrex247 added a commit to Pandrex247/Payara that referenced this pull request Jan 7, 2025
…iltering-incorrect-characters-rfc-9110"

This reverts commit 924596d, reversing
changes made to bbae3a6.
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.

3 participants