-
-
Notifications
You must be signed in to change notification settings - Fork 37.2k
build: shared library should have noexecstack set #17933
Copy link
Copy link
Closed
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.embeddingIssues and PRs related to embedding Node.js in another project.Issues and PRs related to embedding Node.js in another project.
Description
Activity
Metadata
Metadata
Assignees
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.embeddingIssues and PRs related to embedding Node.js in another project.Issues and PRs related to embedding Node.js in another project.
A non-executable stack prevents certain classes of security vulnerabilities.
-Wl,-z,noexecstackis set when building a binary but not when building a shared library (node_shared=="true", corresponding to./configure --shared.)Since the execstack bit is transitive, any binary linking to a shared library with an executable stack also ends up with an executable stack.
The practical impact is probably low because
noexecstackis the default on many systems but it would be good to:Be explicit for consistency across platforms and toolchains, and
Have a test that checks
noexecstackis set on the build product. It could check the output ofexecstack -q filenamebut that might be Linux-only.