harden qnx runtime signal and prompt paths - #89
Open
wordgitet wants to merge 1 commit into
Open
Conversation
Guard signal message setup in inittraps, avoid fallback confstr override on QNX, and harden PS1 hostname expansion when gethostname fails.
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.
Hello Brian,
I put together a another PR that hardens the QNX runtime path in a few targeted spots:
trap.c: make signal message handling more defensive (sys_siglistbounds-safe + stable fallback)confstr.c: avoid overriding libcconfstr()on QNXlex.c: hardenPS1hostname expansion (\h/\H) whengethostname()failsI tested this with QNX SDP 8.0 in QEMU and the shell now starts cleanly, shows the expected hostname prompt, and handles basic commands/arithmetic correctly.
Quick demo from VM:
Cross-builds also pass for:
qcc -V12.2.0,gcc_ntox86_64qcc -V12.2.0,gcc_ntoaarch64leLinux native build/smoke stayed fine on my side too.
Note: this PR focuses on runtime hardening. It does not yet add stronger configure-time signal detection for cross-build scenarios (
--no-thanks), which I can experiment in a separate follow-up.