Skip to content

Compile native libraries with security mitigations #46

@petrroll

Description

@petrroll

Hi, it seems the included native libraries are compiled without some security mitigations s.a. control flow guard.

 ##[error]4. BinSkim Error BA2008 -XXX/net9.0/runtimes/win-arm64/native/libzstd.dll.  
Signature: fed33d15f202d6c830d9059685fa93cc59105ea075cf57abf287593d444ce222
Tool: BinSkim: Rule: BA2008 (EnableControlFlowGuard). https://github.com/microsoft/binskim/blob/main/docs/BinSkimRules.md#rule-BA2008EnableControlFlowGuard
'libzstd.dll' does not enable the control flow guard (CFG) mitigation.
To resolve this issue, pass /guard:cf on both the compiler and linker command lines. Binaries also require the /DYNAMICBASE linker option in order to enable CFG.
For VC projects use ItemDefinitionGroup - ClCompile - ControlFlowGuard property with 'Guard' value, link CFG property will be set automatically.

Same for all other native libraries in the package (z4, ...)

Would it be possible to rectify?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions