Control guard keys set in loadconfig but not in heaer

Nivethitha Pugazhendhi 0 Reputation points
2024-04-03T09:46:52.64+00:00

Hi, I am trying to enable CFG for a set of dll files. I added the /GUARD:CF to my linker.

The output dll has the below in load config:

Guard CF address of check-function pointer

Guard CF address of dispatch-function pointer

Guard CF function table

Guard CF function count 

But Control Flow Guard is not added to the file's header. Help me in identifying what might the issue.

Windows for business | Windows Client for IT Pros | Devices and deployment | Configure application groups
Developer technologies | C++
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RLWA32 49,636 Reputation points
    2024-04-03T09:57:03.3266667+00:00

    According to Enable Control Flow Guard "The /guard:cf option must be passed to both the compiler and linker to build code that uses the CFG exploit mitigation technique. If your binary is built by using a single cl command, the compiler passes the option to the linker. If you compile and link separately, the option must be set on both the compiler and linker commands." Have you done this?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.