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
rgw: Fix use after free in IAM policy parser #16823
Conversation
@adamemerson
So the fact that parent = 0x1 is causing the segmentation trap. And the reset code seems to be:
|
@wjwithagen Do you have d02db19 in the branch you're testing? It was recently committed to master. Also! Can you send me a valgrind trace? Something with --track-origins=yes and --leak-check=no would help. Thank you. |
d94e8bf
to
357f53f
Compare
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
This one was caused by iterator invalidation in set operations. In this case just replace the set entirely with a bitfield. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
39b31b5
to
5353d95
Compare
@wjwithagen @mattbenjamin All right! I think this latest push should fix all the problems. |
@@ -507,7 +507,7 @@ struct PolicyParser : public BaseReaderHandler<UTF8<>, PolicyParser> { | |||
CephContext* cct; | |||
const string& tenant; | |||
Policy& policy; | |||
std::set<TokenID> v; | |||
uint32_t v = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
32 tokens is not many
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamemerson
With the latest changes the test completes on FreeBSD.
No description provided.