fix(security): remove unsafe signal_handler code#26685
Merged
Conversation
This commit addresses the fact that our signal_handler function on Unix systems is not async signal safe, due to the fact that doing heap allocation to print out the signal and stack trace as well as getting the current thread name and grabbing a backtrace are not guaranteed to be unsafe. We can figure out a way to print out this information in the future possibly, but in order to remove the possible vulnerability this commit simply leaves a comment with context and just sets us to abort the process. Closes influxdb_pro/971 which contains the security report that brought this issue to our attention.
jdstrand
approved these changes
Aug 11, 2025
Contributor
jdstrand
left a comment
There was a problem hiding this comment.
Thanks for the PR and the code comments! LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit addresses the fact that our signal_handler function on Unix systems is not async signal safe, due to the fact that doing heap allocation to print out the signal and stack trace as well as getting the current thread name and grabbing a backtrace are not guaranteed to be unsafe.
We can figure out a way to print out this information in the future possibly, but in order to remove the possible vulnerability this commit simply leaves a comment with context and just sets us to abort the process.
Closes influxdb_pro/971 which contains the security report that brought this issue to our attention.
@jdstrand this will probably need some more dedicated time to figure out how to actually do this properly or even if we can get the information that we want, but I opted to close the security hole for now and we can open up a follow up issue to add this information back.