BA2008 (Control Flow Guard) is not reported as error on Windows when using the internal linker
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 431
- Forks
- 44
- Avg merge
- 21h 18m
- Merged PRs (30d)
- 30
Description
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 https://github.com/microsoft/binskim/issues/1176 for now.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the Go linker code at src/cmd/link/internal/ld/pe.go around line 1094 and the BinSkim rule linked in the issue around line 56. Review microsoft/binskim#1176 to understand the proposed direction. Done means deciding how BA2008 should handle PE files produced by the Go linker and validating that Windows builds are reported correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- compilers, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100