You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I found a global-buffer-overflow on ompl/src/ompl/control/PlannerData.h:getControl()
Steps to reproduce
Download the latest source code, compiled with Clang and ASAN, by exporting CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" before compiling.
run the example code: test_planner_data_control
Expected behavior
The program finished without error.
Actual behavior
When running the first example, meet the following output:
Running 5 test cases...
=================================================================
==672751==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7fa6adc771a8 at pc 0x7fa6acb37939 bp 0x7ffe17a714d0 sp 0x7ffe17a714c0
READ of size 8 at 0x7fa6adc771a8 thread T0
#0 0x7fa6acb37938 in ompl::control::PlannerDataEdgeControl::getControl() const ompl/src/ompl/control/PlannerData.h:83#1 0x7fa6acb37938 in ompl::control::PlannerData::removeEdge(ompl::base::PlannerDataVertex const&, ompl::base::PlannerDataVertex const&) ompl/src/ompl/control/src/PlannerData.cpp:96#2 0x55c23048833d in AddRemoveVerticesAndEdges::test_method() ompl/tests/control/planner_data.cpp:464#3 0x55c23048de38 in AddRemoveVerticesAndEdges_invoker ompl/tests/control/planner_data.cpp:414#4 0x7fa6add08531 (/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.74.0+0x27531)#5 0x7fa6add0e5b0 in boost::execution_monitor::catch_signals(boost::function<int ()> const&) (/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.74.0+0x2d5b0)#6 0x7fa6add0eaa0 in boost::execution_monitor::execute(boost::function<int ()> const&) (/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.74.0+0x2daa0)#7 0x7fa6add0eb5b in boost::execution_monitor::vexecute(boost::function<void ()> const&) (/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.74.0+0x2db5b)#8 0x7fa6add32b36 in boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) (/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.74.0+0x51b36)#9 0x7fa6add51966 (/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.74.0+0x70966)#10 0x7fa6add51cee (/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.74.0+0x70cee)#11 0x7fa6add1995a in boost::unit_test::framework::run(unsigned long, bool) (/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.74.0+0x3895a)#12 0x7fa6add2b939 in boost::unit_test::unit_test_main(bool (*)(), int, char**) (/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.74.0+0x4a939)#13 0x7fa6aba29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58#14 0x7fa6aba29e3f in __libc_start_main_impl ../csu/libc-start.c:392#15 0x55c23044cff4 in _start (/data/asan_tur/crash/test_planner_data_control+0x31ff4)
0x7fa6adc771a8 is located 0 bytes to the right of global variable 'NO_EDGE' defined in ompl/src/ompl/base/src/PlannerData.cpp:54:35' (0x7fa6adc771a0) of size 8SUMMARY: AddressSanitizer: global-buffer-overflow ompl/src/ompl/control/PlannerData.h:83 in ompl::control::PlannerDataEdgeControl::getControl() constShadow bytes around the buggy address: 0x0ff555b86de0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ff555b86df0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ff555b86e00: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ff555b86e10: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ff555b86e20: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9=>0x0ff555b86e30: f9 f9 f9 f9 00[f9]f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ff555b86e40: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ff555b86e50: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ff555b86e60: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ff555b86e70: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ff555b86e80: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb==672751==ABORTING
Seems the unchecked operation auto *ctrl = const_cast<Control *>(edge.getControl()); causes this issues. Do you have any idea what really causes this problem, and can this problem be fixed?
The text was updated successfully, but these errors were encountered:
Hello, I found a global-buffer-overflow on ompl/src/ompl/control/PlannerData.h:getControl()
Steps to reproduce
Expected behavior
The program finished without error.
Actual behavior
When running the first example, meet the following output:
Seems the unchecked operation
auto *ctrl = const_cast<Control *>(edge.getControl());
causes this issues. Do you have any idea what really causes this problem, and can this problem be fixed?The text was updated successfully, but these errors were encountered: