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

[19416] Fix bad-free when receiving malformed DATA submessage #3824

Merged
merged 9 commits into from Sep 20, 2023

Conversation

MiguelCompany
Copy link
Member

@MiguelCompany MiguelCompany commented Sep 1, 2023

Description

This PR:

@Mergifyio backport 2.11.x 2.10.x 2.6.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.
  • Changes are ABI compatible.
  • 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.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

@MiguelCompany
Copy link
Member Author

@richiprosima Please test this

@MiguelCompany
Copy link
Member Author

@richiprosima Please test mac

@MiguelCompany
Copy link
Member Author

@richiprosima Please test this

Copy link
Member

@EduPonz EduPonz left a comment

Choose a reason for hiding this comment

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

A much needed tool indeed!
Just a some NITs.

test/blackbox/common/BlackboxTestsTransportUDP.cpp Outdated Show resolved Hide resolved
test/blackbox/common/DatagramInjectionTransport.hpp Outdated Show resolved Hide resolved
src/cpp/rtps/messages/MessageReceiver.cpp Show resolved Hide resolved
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
@EduPonz
Copy link
Member

EduPonz commented Sep 19, 2023

@richiprosima please test this

@EduPonz EduPonz merged commit 47fe5d7 into master Sep 20, 2023
11 of 14 checks passed
@EduPonz EduPonz deleted the bugfix/16784 branch September 20, 2023 06:31
@EduPonz
Copy link
Member

EduPonz commented Sep 20, 2023

@Mergifyio backport 2.11.x 2.10.x 2.6.x

@mergify
Copy link
Contributor

mergify bot commented Sep 20, 2023

backport 2.11.x 2.10.x 2.6.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 20, 2023
* Refs #16784. Added basic custom chaining transport.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Use custom transport to get list of receiver interfaces.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Added regression file.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Processing regression files.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Separation of transport and descriptor.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Small refactor.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Fix issue.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #19416. Fix build error in Mac.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #19416. Fix include order.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

---------

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 47fe5d7)
mergify bot pushed a commit that referenced this pull request Sep 20, 2023
* Refs #16784. Added basic custom chaining transport.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Use custom transport to get list of receiver interfaces.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Added regression file.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Processing regression files.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Separation of transport and descriptor.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Small refactor.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Fix issue.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #19416. Fix build error in Mac.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #19416. Fix include order.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

---------

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 47fe5d7)
mergify bot pushed a commit that referenced this pull request Sep 20, 2023
* Refs #16784. Added basic custom chaining transport.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Use custom transport to get list of receiver interfaces.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Added regression file.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Processing regression files.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Separation of transport and descriptor.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Small refactor.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Fix issue.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #19416. Fix build error in Mac.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #19416. Fix include order.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

---------

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 47fe5d7)

# Conflicts:
#	src/cpp/rtps/messages/MessageReceiver.cpp
#	test/blackbox/CMakeLists.txt
MiguelCompany added a commit that referenced this pull request Sep 21, 2023
* Fix bad-free when receiving malformed DATA submessage (#3824)

* Refs #16784. Added basic custom chaining transport.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Use custom transport to get list of receiver interfaces.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Added regression file.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Processing regression files.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Separation of transport and descriptor.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Small refactor.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #16784. Fix issue.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #19416. Fix build error in Mac.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #19416. Fix include order.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

---------

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 47fe5d7)

# Conflicts:
#	src/cpp/rtps/messages/MessageReceiver.cpp
#	test/blackbox/CMakeLists.txt

* Fixed conflicts

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

---------

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
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.

[16784] Malformed DATA submessage leads to bad-free during SPDP
2 participants