Skip to content

[BUG] LogMonitor.exe being flagged for BA2008 for missing ControlFlowGuard in BinSkim #216

Description

@ericsuhong

Describe the bug
BimSkim tool is flagging LogMonitor.exe because it is not being compiled with appropriate flags:

##[warning]1. BinSkim Error BA2008 - File: out/release-x64/..................../LogMonitor.exe.  
Signature: cf1589786cb2eb6e24ec7e3ab21a5fa5c83c77f9eefdaf11e7475e382eaa14ab
Tool: BinSkim: Rule: BA2008 (EnableControlFlowGuard). https://github.com/microsoft/binskim/blob/main/docs/BinSkimRules.md#rule-BA2008EnableControlFlowGuard
'LogMonitor.exe' 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.

To Reproduce
Download BinSkim tool (https://www.nuget.org/packages/Microsoft.CodeAnalysis.BinSkim) and run:

BinSkim.exe analyze ServiceMonitor.exe

Expected behavior
LogMonitor.exe should be compiled with ControlFlowGuard flag and should NOT be flagged by binskim BA2008.

Screenshots
If applicable, add screenshots to help explain your problem.

Configuration
-Tool: LogMonitor
-Version: 2.1.1

Additional context
Add any other context about the problem here.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions