Skip to content
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

prevent false-positive stack-buffer-overflow ASan detections on signal stack, attemp 2 #1205

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

PetrShumilov
Copy link
Contributor

__sanitizer_start_switch_fiber and __sanitizer_finish_switch_fiber are not sufficient for informing ASan about the alternate signal stack. In our case, when a signal occurs, the activation of the alternate signal stack mislead ASan about current actual stack and leads to incorrect behavior of __asan_handle_no_return:

==15381==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7f98b59d0000; bottom 0x00000bb21000; size: 0x7f98a9eaf000 (140293662502912)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189

Need to use explicit signal stack unpoisoning instead.

Fix of #1201

Signed-off-by: Petr Shumilov <p.shumilov@vkteam.ru>
@PetrShumilov PetrShumilov added bug Something isn't working small fix When it's not an huge enhancement runtime Feature related to runtime labels Jan 10, 2025
@PetrShumilov PetrShumilov added this to the next milestone Jan 10, 2025
@PetrShumilov PetrShumilov self-assigned this Jan 10, 2025
Copy link
Contributor

@apolyakov apolyakov left a comment

Choose a reason for hiding this comment

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

lgtm

@PetrShumilov PetrShumilov merged commit 9c2ca0c into master Jan 10, 2025
5 checks passed
@PetrShumilov PetrShumilov deleted the pshumilov/fix_asan_attempt2 branch January 10, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working runtime Feature related to runtime small fix When it's not an huge enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants