Skip to content

cmd/asm,cmd/compile: add support for shadow stack #66840

@loqs

Description

@loqs

X86_64 CPUs can support Shadow Stack (SHSTK). SHSTK helps to mitigate against Return Oriented Programming (ROP) expoits, as well as others that target a process's call stack.

On linux binaries need to be marked with a note section .note.gnu.property marking support for GNU_PROPERTY_X86_FEATURE_1_SHSTK in order to support SHSTK. I believe Windows also supports SHSTK but have no knowledge of how.

Go should ideally support SHSTK on Linux and add the note section showing it does support it. Provided Go does not change the stack I believe it should be sufficient for Go to mark the binaries it generates.

#66054 is for the other half of Control-flow Enforcement Technology (CET).

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions