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

stack-buffer-overflow in xml_parsing.cpp #672

Open
Rrooach opened this issue Oct 17, 2023 · 0 comments
Open

stack-buffer-overflow in xml_parsing.cpp #672

Rrooach opened this issue Oct 17, 2023 · 0 comments

Comments

@Rrooach
Copy link

Rrooach commented Oct 17, 2023

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • ROS2 Version: Humble
  • Version or commit hash: 4b9bd8638de2cdd5bde363c84ecd4760105ec00e
  • DDS implementation: FastRTPS

Steps to reproduce issue

Hi, when I fuzz test the behavior tree with Nav2, I encountered an ASAN report during testing, within the behavior tree module.

I build the project with AddressSanitizer:

 CC=clang CXX=clang++  colcon build --parallel-workers 3333  --cmake-args -DCMAKE_C_FLAGS=" -g  -w  -fsanitize=address " -DCMAKE_CXX_FLAGS="  -g  -w -fsanitize=address "

And then I start the fuzzing process, and I get the following error report:
https://pastebin.com/2MLhqdp8

It seems there is an illegal access at src/behaviortree-cpp-v3/src/xml_parsing.cpp

  for (auto bt_root = xml_root->FirstChildElement("BehaviorTree"); bt_root != nullptr;
       bt_root = bt_root->NextSiblingElement("BehaviorTree"))
  {
    recursiveStep(bt_root);
  }

Expected behavior

The program executes without error

Actual behavior

The program crashed with the ASAN report.

It would be so nice of you to review this bug report. Thank you again for taking the time. Any suggestions or feedback you can provide would be very helpful.

Tasks

No tasks being tracked yet.
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

No branches or pull requests

1 participant