Skip to content

BA2008 (Control Flow Guard) is not reported as error on Windows when using the internal linker #2237

@qmuntal

Description

@qmuntal

BinSkim skips the BA2008 if the PE optional header doesn't set MajorLinkerVersion to 14 or higher. See https://github.com/microsoft/binskim/blob/7946d7c5df1961141d8e88d4fbbdd3dfc01f921a/src/BinSkim.Rules/PERules/BA2008.EnableControlFlowGuard.cs#L56.

The Go linker sets it to 3 (invented number, probably), see https://github.com/golang/go/blob/f26a12368c365e59d77b24f5db3801fd50821e42/src/cmd/link/internal/ld/pe.go#L1094. so the rule is skipped.

Still pondering options to fix this, created microsoft/binskim#1176 for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions