Skip to content

[23043] Fix ParticipantGenericMessage serialization (backport #5843)#5855

Merged
rsanchez15 merged 2 commits into2.14.xfrom
mergify/bp/2.14.x/pr-5843
Jun 27, 2025
Merged

[23043] Fix ParticipantGenericMessage serialization (backport #5843)#5855
rsanchez15 merged 2 commits into2.14.xfrom
mergify/bp/2.14.x/pr-5843

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Jun 6, 2025

Description

This PR:

  1. Adds alignment to 4 bytes after creating a change in the SecurityManager.
  2. Fixes the addOctetVector method to properly check if the final padding fits into the message.

@Mergifyio backport 3.2.x 2.14.x

Contributor Checklist

  • Commit messages follow the project guidelines.

  • The code follows the style guidelines of this project.

  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally

  • N/A Any new/modified methods have been properly documented using Doxygen.

  • N/A Any new configuration API has an equivalent XML API (with the corresponding XSD extension)

  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.

  • Changes are API compatible.

  • N/A New feature has been added to the versions.md file (if applicable).

  • N/A New feature has been documented/Current behavior is correctly described in the documentation.

  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

This is an automatic backport of pull request #5843 done by [Mergify](https://mergify.com).

@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Jun 6, 2025

Cherry-pick of 1bf0040 has failed:

On branch mergify/bp/2.14.x/pr-5843
Your branch is up to date with 'origin/2.14.x'.

You are currently cherry-picking commit 1bf0040b.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   include/fastdds/rtps/messages/CDRMessage.hpp
	modified:   test/blackbox/common/BlackboxTestsSecurity.cpp
	new file:   test/blackbox/security_bug_participant_generic_message.xml
	new file:   test/certs/test_router/governance.smime
	new file:   test/certs/test_router/local_pub1_cert.pem
	new file:   test/certs/test_router/local_pub1_key.pem
	new file:   test/certs/test_router/main_ca_cert.pem
	new file:   test/certs/test_router/permissions.smime
	new file:   test/certs/test_router/router_cert.pem
	new file:   test/certs/test_router/router_key.pem

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/cpp/rtps/security/SecurityManager.cpp
	both modified:   test/blackbox/CMakeLists.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the conflicts Backport PR wich git cherry pick failed label Jun 6, 2025
@MiguelCompany MiguelCompany added this to the v2.14.5 milestone Jun 6, 2025
* Refs #23043: Regression Test

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #23043: Fix ParticipantGenericMessage serialization

Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>

* Refs #23043: Align after calculating serialized size

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #23043: Uncrustify

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
Co-authored-by: cferreiragonz <carlosferreira@eprosima.com>
(cherry picked from commit 1bf0040)

# Conflicts:
#	src/cpp/rtps/security/SecurityManager.cpp
#	test/blackbox/CMakeLists.txt
@cferreiragonz cferreiragonz force-pushed the mergify/bp/2.14.x/pr-5843 branch from 0ef5c7d to 41cea4e Compare June 26, 2025 07:18
cferreiragonz
cferreiragonz previously approved these changes Jun 26, 2025
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
@cferreiragonz cferreiragonz force-pushed the mergify/bp/2.14.x/pr-5843 branch from 41cea4e to 6045a5b Compare June 26, 2025 07:21
@cferreiragonz cferreiragonz added ci-pending PR which CI is running and removed conflicts Backport PR wich git cherry pick failed labels Jun 26, 2025
@cferreiragonz cferreiragonz requested review from richiprosima and removed request for richiprosima June 26, 2025 07:22
@cferreiragonz cferreiragonz added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels Jun 27, 2025
@rsanchez15 rsanchez15 merged commit c2d4144 into 2.14.x Jun 27, 2025
18 of 19 checks passed
@rsanchez15 rsanchez15 deleted the mergify/bp/2.14.x/pr-5843 branch June 27, 2025 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants