-
Notifications
You must be signed in to change notification settings - Fork 912
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trap for overly large input to XmlRPCPP (#2065)
* Trap for overly large input to XmlRPCPP which could cause problems with int <-> size_t conversions. - In XmlRpcClient, XmlRpcServerConnection and XmlRpcSocket, recognize when incoming or outgoing data is too large, generate an error and discard the data when practical. - Use the safe strtol() rather than atoi() to decode an incoming content-length header, and generate an error if the length is invalid or too large. - In XmlRpcUtil, prevent attempts to parse overly large XML input. - Add tests where they can reasonably be inserted into existing test routines. Although this fix could be cleaner the update is written to make the update ABI compatible. This fix addresses CVE-2020-16124 / Integer overflow in ros_comm. Signed-off-by: Sid Faber <sid.faber@canonical.com> * Trap for memory allocation error in tests Signed-off-by: Sid Faber <sid.faber@canonical.com> * Revert earlier change Signed-off-by: Sid Faber <sid.faber@canonical.com> * Update tests Replace call to GTEST_SKIP with output to stderr. Remove the redResponseOversize test since out-of-memory errors during testing cannot easily be handled within the existing test objects. Signed-off-by: Sid Faber <sid.faber@canonical.com> * Improve test error handling Use GTEST_SKIP if available, otherwise print to stderr. Remove test that's being killed because it takes too long to handle the oversize test values
- Loading branch information
1 parent
76e49bc
commit 3347909
Showing
5 changed files
with
325 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.