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
Although there is release behavior for the dyn_param_handler_ in the destructor of InflationLayer, but it can't shutdown the callback thread of this handler.
Such conclusion has been proved by the experiment described in another issue #4496
so that the thread of this handler may keep executing after the on_cleanup() of costmap_ros_
however, if here's a callback task being executed by dyn_param_handler_, it would access the released resource in inflation_layer_, and UAF-bug occurs.
suggestion
Similarly, perhaps we need to update the way to completely shutdown dyn_param_handler_ of inflation_layer_?
The text was updated successfully, but these errors were encountered:
Bug report
Required Info:
Steps to reproduce issue
Bug happened in my normal usage.
Launch the navigation2 as following steps:
Expected behavior
no bug occured.
Actual behavior
the Asan report of this bug is as following:
Additional information
It's a shutdown-issue
First, based on my execution logs, I can confirm this is a shutdown issue.
It is caused by the
dyn_param_handler_
in theinflation_layer_
not being actively closed.InflationLayer::dynamicParametersCallback()
that triggers the bug is executed by thedynamic_handler_
ofinflation_layer_
:navigation2/nav2_costmap_2d/plugins/inflation_layer.cpp
Lines 105 to 109 in a6b3de1
dyn_param_handler_
in the destructor ofInflationLayer
, but it can't shutdown the callback thread of this handler.Such conclusion has been proved by the experiment described in another issue #4496
on_cleanup()
ofcostmap_ros_
navigation2/nav2_costmap_2d/plugins/inflation_layer.cpp
Lines 79 to 83 in 9fbae3e
on_cleanup()
process of thecostmap_ros_
node,inflation_layer_
is released:navigation2/nav2_costmap_2d/src/costmap_2d_ros.cpp
Line 364 in 9fbae3e
however, if here's a callback task being executed by
dyn_param_handler_
, it would access the released resource ininflation_layer_
, and UAF-bug occurs.suggestion
Similarly, perhaps we need to update the way to completely shutdown
dyn_param_handler_
ofinflation_layer_
?The text was updated successfully, but these errors were encountered: