Skip to content

BA2012 (Stack cookie modification) passes on Windows using the internal linker #2238

Closed

Description

@qmuntal

What BinSkim reports for the internal-linker build is not a normal “stack cookie preserved” pass; it is specifically:

  • Result ID: Pass_NoLoadConfig
  • Message meaning: the binary does not contain a load config table, so BinSkim assumes it was either built with an older toolchain or is not subject to the relevant /GS-style check

The PE metadata matches that:

  • Internal linker: LoadConfigTableRVA: 0x0
  • External linker: nonzero LoadConfigTableRVA, but SecurityCookie: 0x0

That is why the behavior flips:

  1. Internal linker: no load config table → BA2012 = pass (Pass_NoLoadConfig)
  2. External linker: load config table exists, but no usable cookie is found → BA2012 = error (Error_CouldNotLocateCookie)

So the short answer is: BA2012 passes on internal-linker Go binaries because BinSkim interprets the absence of a load-config table as a benign/pass condition, not because it found a valid stack cookie implementation.

Activity

  1. changed the title [-]Investigate why BA2012 (Stack cookie modification) passes on Windows using the internal linker[/-] [+]BA2012 (Stack cookie modification) passes on Windows using the internal linker[/+] on Apr 17, 2026
  2. qmuntal commented on Apr 17, 2026

    @qmuntal
    MemberAuthor

    This has been fixed on Go 1.27 (see https://go-review.googlesource.com/c/go/+/756680). Now BinSkim will correctly fail BA2012.

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions