Skip to content

Windows: Default to icacls vs winapi to avoid EDR-hook related crash#16

Merged
hdm merged 6 commits into
mainfrom
fun-edr-hook-crash
Jun 4, 2026
Merged

Windows: Default to icacls vs winapi to avoid EDR-hook related crash#16
hdm merged 6 commits into
mainfrom
fun-edr-hook-crash

Conversation

@hdm

@hdm hdm commented Jun 4, 2026

Copy link
Copy Markdown

This works around a bug where CrowdStrike's EDR hooks corrupt the Go heap when the ACL APIs are called directly by calling out to the icacls command-line.

Copilot AI left a comment

Copy link
Copy Markdown

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 changes how Windows ACLs are applied during browser install/launch to avoid Go heap corruption observed when CrowdStrike Falcon EDR hooks Win32 ACL APIs. It defaults to shelling out to icacls (with an opt-in flag to use the in-process Win32 ACL path), and adds Windows-only tests plus CI coverage to validate both backends.

Changes:

  • Default Windows permission/ownership operations to an icacls-based implementation, with a UseWinACLAPI escape hatch to force the Win32 API backend.
  • Add Windows ACL backend tests to validate equivalence and dispatcher behavior, and wire them into the Windows workflow.
  • Refactor osEnsureApplicationPermissions into a (*Browser) method for consistency with the new backend routing.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/launcher/os_windows.go Adds icacls backend, dispatcher methods honoring UseWinACLAPI, and switches callers to the dispatchers.
lib/launcher/os_windows_acl_test.go Adds Windows-only tests that exercise both ACL backends and dispatcher routing.
lib/launcher/os_unix.go Refactors osEnsureApplicationPermissions into a (*Browser) method (no behavior change).
lib/launcher/browser.go Introduces UseWinACLAPI field + WithUseWinACLAPI option; updates install path to call the new method receiver.
.github/workflows/winacl_windows.yml Runs the new launcher ACL backend tests on Windows CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/launcher/os_windows.go Outdated
Comment thread lib/launcher/os_windows.go
Comment thread lib/launcher/os_windows.go
Comment thread lib/launcher/os_windows_acl_test.go
hdm and others added 5 commits June 3, 2026 20:55
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@hdm
hdm merged commit 2fd139a into main Jun 4, 2026
1 check passed
@hdm
hdm deleted the fun-edr-hook-crash branch June 4, 2026 02:07
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