Let’s talk about CFI: Microsoft Edition
Summary: Trail of Bits published a second installment on control flow integrity covering Microsoft's Control Flow Guard (CFG), which requires Windows 8.1 Update 3 and Visual Studio 2015 as minimums and is enabled by adding /guard:cf to compiler and linker flags. The post contrasts CFG's single per-process valid target map, adjustable at runtime via SetProcessValidCallTargets, with Clang's finer-grained per-type-signature checks fixed at compile time.
Key Takeaway: CFG enforcement only applies to libraries also compiled with CFG, so a single unprotected dependency leaves cross-library indirect calls unguarded even when the main application is built with /guard:cf.
Read the original at Trail of Bits Blog ↗