-
Notifications
You must be signed in to change notification settings - Fork 525
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
UAF bug caused by laser_callback()
#694
Comments
well, it seems that such issue has been fixed in slam_toolbox/src/slam_toolbox_common.cpp Lines 240 to 260 in a3442d2
but no such code to reset these pointers in both |
Feel free to backport, happy to merge that for humble/iron |
Shall I backport by |
I'd try cherry-pick, but if it looks too hard, I understand manual for this case. |
Required Info:
Steps to reproduce issue
I use slam-toolbox (async) by following command :
Running Slam-Toolbox within AddressSanitizer , I always faced to such UAF report during shutdown-period
Expected behavior
No UAF occurs
Actual behavior
we could always face to an ASAN-report about UAF bug as following:
Additional information
the function
laserCallback()
is bind to thescan_filter_sub_
andscan_filter_
as following:slam_toolbox/src/slam_toolbox_common.cpp
Lines 233 to 241 in 94cec98
but here's no
reset()
for such two pointer in the destructorslam_toolbox/src/slam_toolbox_common.cpp
Lines 85 to 101 in 94cec98
So that, the callback-function might be still working after the node is destructed and cause the UAF bug as a result.
The text was updated successfully, but these errors were encountered: