-
Notifications
You must be signed in to change notification settings - Fork 817
[20166] Fix data race in PDPListener and SecurityManager #4188
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
Conversation
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.
Apart from my NIT below, a regression test should be added
@richiprosima please test this |
src/cpp/rtps/builtin/discovery/participant/DS/PDPSecurityInitiatorListener.cpp
Outdated
Show resolved
Hide resolved
@richiprosima please test this |
Signed-off-by: Mario Dominguez <[email protected]>
…SecurityManager::discovered_participant() Signed-off-by: Mario Dominguez <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
7a54e8f
to
ef14749
Compare
@richiprosima please test this |
Signed-off-by: Mario Dominguez <[email protected]>
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.
LGTM with green CI
@richiprosima Please test mac |
1 similar comment
@richiprosima Please test mac |
@Mergifyio backport 2.12.x 2.11.x 2.10.x |
✅ Backports have been created
|
* Refs #20166: Regression Test Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Use the participant proxy data stored the collection in SecurityManager::discovered_participant() Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Test Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> --------- Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit 84334da)
* Refs #20166: Regression Test Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Use the participant proxy data stored the collection in SecurityManager::discovered_participant() Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Test Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> --------- Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit 84334da)
* Refs #20166: Regression Test Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Use the participant proxy data stored the collection in SecurityManager::discovered_participant() Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Test Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> --------- Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit 84334da) Co-authored-by: Mario Domínguez López <[email protected]>
* Refs #20166: Regression Test Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Use the participant proxy data stored the collection in SecurityManager::discovered_participant() Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Test Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> --------- Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit 84334da)
* Refs #20166: Regression Test Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Use the participant proxy data stored the collection in SecurityManager::discovered_participant() Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Test Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> --------- Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit 84334da) Co-authored-by: Mario Domínguez López <[email protected]>
* Refs #20166: Regression Test Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Use the participant proxy data stored the collection in SecurityManager::discovered_participant() Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> * Refs #20166: Test Rev suggestion Signed-off-by: Mario Dominguez <[email protected]> --------- Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit 84334da) Co-authored-by: Mario Domínguez López <[email protected]>
Description
This PR fixes a data race occurring in
PDPListenerSecurityInitiator
affectingSecurityManager
. Thetemp_participant_data_
was being overwritten asdiscovered_participant()
was being called without thePDP
mutex taken. This causes a corruption when the secure participant was in the middle of matching to a previous secure participant.This PR also ensures that the
discovered_participant()
method is using theParticipantProxyData
from thediscovered_participants
collection.Note: openning as draft as proper test needs to be added
@Mergifyio backport 2.12.x 2.11.x 2.10.x
Contributor Checklist
versions.md
file (if applicable).Reviewer Checklist