Skip to content

rust binaries should not have an executable stack #5643

Closed

Description

@thestinger

It seems like an attempt was made to fix this in the past, but it's currently present:

rust W: ELF file ('usr/bin/rust') has executable stack.
rust W: ELF file ('usr/bin/rustc') has executable stack.
rust W: ELF file ('usr/bin/rusti') has executable stack.
rust W: ELF file ('usr/bin/rustdoc') has executable stack.
rust W: ELF file ('usr/bin/rustpkg') has executable stack.
rust W: ELF file ('usr/lib/libstd-4782a756585a81-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/librustc-c84825241471686d-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/libcore-c3ca5d77d81b46c1-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/librusti-5047c7f210c7cac8-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/librust-39583f72884834e3-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/libsyntax-84efebcb12c867a2-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-4782a756585a81-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/rustc/x86_64-unknown-linux-gnu/lib/librustc-c84825241471686d-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/rustc/x86_64-unknown-linux-gnu/lib/librusti-5047c7f210c7cac8-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/rustc/x86_64-unknown-linux-gnu/lib/librust-39583f72884834e3-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/rustc/x86_64-unknown-linux-gnu/lib/librustdoc-1ac3c0763957e4b0-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/rustc/x86_64-unknown-linux-gnu/lib/libsyntax-84efebcb12c867a2-0.6.so') has executable stack.
rust W: ELF file ('usr/lib/rustc/x86_64-unknown-linux-gnu/lib/librustpkg-795073e423d025b-0.6.so') has executable stack.

This won't fly on systems like Fedora that use SELinux since it won't allow the binary to run with the default policies.

Clearing the executable stack with execstack still leaves a working set of binaries, so it's definitely not required.

Activity

  1. thestinger commented on Mar 31, 2013

    @thestinger
    ContributorAuthor

    It looks like the linker enables an executable stack when you compile in raw assembly without GNU-stack.

  2. thestinger commented on Apr 1, 2013

    @thestinger
    ContributorAuthor

    Fixed by #5647.

  3. added a commit that references this issue on Jun 4, 2020
  4. added a commit that references this issue on Aug 21, 2026
  5. added a commit that references this issue on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions