Skip to content

fix(security): remove unsafe signal_handler code#26685

Merged
mgattozzi merged 1 commit intomainfrom
mgattozzi/core/signal_handler
Aug 11, 2025
Merged

fix(security): remove unsafe signal_handler code#26685
mgattozzi merged 1 commit intomainfrom
mgattozzi/core/signal_handler

Conversation

@mgattozzi
Copy link
Copy Markdown
Contributor

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.

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.
Copy link
Copy Markdown
Contributor

@jdstrand jdstrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR and the code comments! LGTM

@mgattozzi mgattozzi merged commit 992a2df into main Aug 11, 2025
12 checks passed
@mgattozzi mgattozzi deleted the mgattozzi/core/signal_handler branch August 11, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants