nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.3k stars 29.45k forks source link

Enable CFG in node.exe #42100

Open ahtrahdis7 opened 2 years ago

ahtrahdis7 commented 2 years ago

BinSkim is a binary static analysis tool that provides security and correctness results for Windows Portable Executable and *nix ELF binary formats.

error BA2008: 'node.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.

Screenshot 2022-02-23 at 6 17 17 PM

Package used : https://github.com/microsoft/binskim Command used : .\BinSkim.exe analyze < path to executable >

nschonni commented 2 years ago

@Trott do you want to transfer this to the regular node repo, it doesn't belong here

richardlau commented 2 years ago

cc @nodejs/platform-windows

ahtrahdis7 commented 2 years ago

Please check for Linux and MacOS binaries also.

Trott commented 2 years ago

Please check for Linux and MacOS binaries also.

Control flow guard isn't a thing that exists on those platforms.

ahtrahdis7 commented 2 years ago

I meant to say, run the Mac and Linux binaries against BinSkim to generate their reports.