Repository navigation
quincy: rgw: Add missing empty checks to the split string in is_string_in_set(). - #56348
Merged
Merged
Conversation
In certain cases, where a user misconfigures a CORS rule, the entirety of the string can be token characters (or, at least, the string before and after a given token is all token characters), but != "*". If the misconfigured string includes "*" we'll try to split the string and we assume that we can pop the list of string elements when "*" isn't first/last, but get_str_list() won't return anything for token-only substrings and thus 'ssplit' will have fewer elements than would be expected for a correct rule. In the case of an empty list, front() has undefined behaviour; in our experience, it often results in a huge allocation attempt because the code tries to copy the string into a local variable 'sl'. An example of this misconfiguration (and thus a reproduction case) is configuring an origin of " *". Signed-off-by: Matt Benjamin <[email protected]> (cherry picked from commit 64803e1)
Contributor
|
jenkins test api |
Contributor
|
jenkins test make check |
Contributor
|
jenkins test docs |
Contributor
|
This PR is under test in https://tracker.ceph.com/issues/65558. |
Contributor
|
This PR is under test in https://tracker.ceph.com/issues/65561. |
yuriw
approved these changes
Apr 22, 2024
yuriw
left a comment
Contributor
There was a problem hiding this comment.
Reviewed-by: Casey Bodley [email protected]
Contributor
|
jenkins test windows |
Contributor
Author
|
jenkins test make check |
Contributor
|
This PR is under test in https://tracker.ceph.com/issues/65638. |
yuriw
added a commit
to yuriw/ceph
that referenced
this pull request
Apr 23, 2024
* refs/pull/56348/head: rgw: Add missing empty checks to the split string in is_string_in_set().
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.
backport tracker: https://tracker.ceph.com/issues/65002
backport of #56225
parent tracker: https://tracker.ceph.com/issues/64953
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh