-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Completely shutdown dynamic_param callback threads instead of only dyn_param_handler_.reset()
#4496
Comments
However, I noticed that during navigation2/nav2_amcl/src/amcl_node.cpp Lines 304 to 316 in 715df8f
But it seems that it doesn't actually achieve this, so I conducted the following experiment to verify: Experiment:Proving that the callback function continues to execute even after
|
Perhaps we need to https://github.com/ros2/rclcpp/blob/8230d15ef7ffa9e824d7e0f9c623537ae331dc73/rclcpp/src/rclcpp/node.cpp#L475-L479
|
dynamicParametersCallback
executing even after dyn_handler_.reset()
dyn_param_handler_.reset()
Sure! My future work will follow these steps:
Perhaps I'm not good at renaming issues, so feel free to modify it if it seems inappropriate. 😜 |
That's perfect! |
Merged |
Bug report
Required Info:
Steps to reproduce issue
nav2_amcl
, like following one:ros2 param set amcl scan_topic scan
Ctrl+C
Expected behavior
no UAF bug
Actual behavior
UAF bug occured during
on_cleanup()
of nav2_amcl, the asan report is as following;Additional information
The cause of the UAF bug:
The callback thread
dynamicParametersCallback()
ofdynamic_handler_
is still running though nav2_amcl has been executingon_cleanup()
.And
on_cleanup()
would release many resources of nav2_amcl but the callback thread would access those released resources, so that the UAF bug occurs.The text was updated successfully, but these errors were encountered: