Skip to content

Enable CFG for ARM64X ANCM forwarders - #68744

Merged
akoeplinger merged 1 commit into
dotnet:mainfrom
akoeplinger:fix-arm64x-forwarder-cfg
Aug 24, 2026
Merged

akoeplinger merged 1 commit into
dotnet:mainfrom
akoeplinger:fix-arm64x-forwarder-cfg

Conversation

@akoeplinger

@akoeplinger akoeplinger commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

Description

The ARM64X ANCM forwarders are built using direct cl and link invocations, so the native mitigation settings imported by build.proj are not applied to them. This was missed in #63437 / #63725

Pass /guard:cf and /Qspectre to the ARM64 and ARM64EC compiler invocations, and pass /guard:cf and /dynamicbase to the final ARM64X linker invocations. This enables Control Flow Guard on both forwarder DLLs.

Validated with the VS 18 ARM64 toolchain. dumpbin /headers /loadconfig reports the Control Flow Guard DLL characteristic, CF instrumented, and an FID table containing two targets for both generated forwarders.

Addresses dotnet/dotnet#8565.

Pass the native mitigation flags directly to the compiler and linker commands used to build the forwarders.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 2b43712b-8ff0-4c54-8387-2e3fadfc1b65
Copilot AI lite review requested due to automatic review settings August 24, 2026 12:46
@akoeplinger
akoeplinger requested review from a team and wtgodbe as code owners August 24, 2026 12:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables native mitigation flags (Control Flow Guard and Spectre mitigations) for the ARM64X ANCM forwarder DLLs that are built via direct cl/link invocations, so they receive equivalent security hardening to the rest of the native installer components.

Changes:

  • Adds /guard:cf and /Qspectre to the ARM64 and ARM64EC cl compile steps for both forwarders.
  • Adds /guard:cf and /dynamicbase to the ARM64X link steps for both forwarders.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@wtgodbe

wtgodbe commented Aug 24, 2026

Copy link
Copy Markdown
Member

Should we backport to 11 & 10?

@akoeplinger
akoeplinger merged commit fdb8587 into dotnet:main Aug 24, 2026
27 checks passed
@akoeplinger
akoeplinger deleted the fix-arm64x-forwarder-cfg branch August 24, 2026 22:45
@akoeplinger

Copy link
Copy Markdown
Member Author

/backport to release/11.0

@akoeplinger

Copy link
Copy Markdown
Member Author

/backport to release/10.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0 (link to workflow run)

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0 (link to workflow run)

@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 25, 2026
akoeplinger added a commit that referenced this pull request Aug 25, 2026
…68758)

Enable CFG for ARM64X ANCM forwarders

Co-authored-by: Alexander Köplinger <[email protected]>
akoeplinger added a commit that referenced this pull request Aug 25, 2026
…68757)

Enable CFG for ARM64X ANCM forwarders

Co-authored-by: Alexander Köplinger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants