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

Fix remote code execution due to pickle #37

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

timonegk
Copy link
Member

Summary

Closes #34.

The problem with using ROS serialization only is that we also have to send the message metadata (topic, hostname, latched, message type). To send them, we need another type of container. A module like struct is not really suitable because it does not support variable-length data like strings.
So now, the serialization is used on the message. Then, this is added to a dict with the other metadata. This is then pickled, compressed, and encrypted. Because the pickle now only uses native types (str, bool, bytes), we can forbid any other kind of data. Due to the serialization of the message, we now also have to send the message type, it is no longer coded into the pickle object.

@timonegk timonegk merged commit 11e9dd1 into master Apr 19, 2024
1 check passed
@timonegk timonegk deleted the fix/remote-code-execution branch April 19, 2024 13:13
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.

Use build in serialization from rclpy for UDP-bridge
2 participants