[Openvpn-devel] BUILD: enable CFG and Spectre mitigation for MSVC

Message ID 20210915122534.355-1-chipitsine@gmail.com
State Changes Requested
Headers show
Series
  • [Openvpn-devel] BUILD: enable CFG and Spectre mitigation for MSVC
Related show

Commit Message

Ilya Shipitsin Sept. 15, 2021, 12:25 p.m.
found by BinSkim

Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
---
 src/compat/Debug.props                |  1 +
 src/compat/Release.props              |  1 +
 src/compat/compat.vcxproj             |  6 ++++++
 src/openvpn/openvpn.vcxproj           | 12 ++++++++++++
 src/openvpnmsica/openvpnmsica.props   |  1 +
 src/openvpnmsica/openvpnmsica.vcxproj |  6 ++++++
 src/openvpnserv/openvpnserv.vcxproj   |  6 ++++++
 src/tapctl/tapctl.vcxproj             |  6 ++++++
 8 files changed, 39 insertions(+)

Comments

Lev Stipakov Sept. 21, 2021, 11:49 a.m. | #1
Hi,

Sorry for the delay.

I got "command line error D8016: '/ZI' and '/guard:cf' command-line
options are incompatible" errors for Debug configuration,
Release works fine. Looks like "Debug Information Format: Program
Database for Edit and Continue" is not compatible with Control Flow
Guard:

https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-control-flow-guard?view=msvc-160

Let's apply those changes to Release configurations only.

ke 15. syysk. 2021 klo 15.27 Ilya Shipitsin (chipitsine@gmail.com) kirjoitti:
>
> found by BinSkim
>
> Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
> ---
>  src/compat/Debug.props                |  1 +
>  src/compat/Release.props              |  1 +
>  src/compat/compat.vcxproj             |  6 ++++++
>  src/openvpn/openvpn.vcxproj           | 12 ++++++++++++
>  src/openvpnmsica/openvpnmsica.props   |  1 +
>  src/openvpnmsica/openvpnmsica.vcxproj |  6 ++++++
>  src/openvpnserv/openvpnserv.vcxproj   |  6 ++++++
>  src/tapctl/tapctl.vcxproj             |  6 ++++++
>  8 files changed, 39 insertions(+)
>
> diff --git a/src/compat/Debug.props b/src/compat/Debug.props
> index 31bb9d91..810609bf 100644
> --- a/src/compat/Debug.props
> +++ b/src/compat/Debug.props
> @@ -15,6 +15,7 @@
>        <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
>        <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
>        <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
> +      <ControlFlowGuard>Guard</ControlFlowGuard>
>      </ClCompile>
>    </ItemDefinitionGroup>
>    <ItemGroup />
> diff --git a/src/compat/Release.props b/src/compat/Release.props
> index 63828b79..50eaa8de 100644
> --- a/src/compat/Release.props
> +++ b/src/compat/Release.props
> @@ -15,6 +15,7 @@
>        <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
>        <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
>        <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
> +      <ControlFlowGuard>Guard</ControlFlowGuard>
>      </ClCompile>
>      <Link>
>        <EnableCOMDATFolding>true</EnableCOMDATFolding>
> diff --git a/src/compat/compat.vcxproj b/src/compat/compat.vcxproj
> index 49824783..fe03a51a 100644
> --- a/src/compat/compat.vcxproj
> +++ b/src/compat/compat.vcxproj
> @@ -38,33 +38,39 @@
>      <CharacterSet>MultiByte</CharacterSet>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
>      <ConfigurationType>StaticLibrary</ConfigurationType>
>      <CharacterSet>MultiByte</CharacterSet>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
>      <ConfigurationType>StaticLibrary</ConfigurationType>
>      <CharacterSet>MultiByte</CharacterSet>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
>      <ConfigurationType>StaticLibrary</ConfigurationType>
>      <CharacterSet>MultiByte</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
>      <ConfigurationType>StaticLibrary</ConfigurationType>
>      <CharacterSet>MultiByte</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
>      <ConfigurationType>StaticLibrary</ConfigurationType>
>      <CharacterSet>MultiByte</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
>    <ImportGroup Label="ExtensionSettings">
> diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
> index 5b3e0c6c..8d27f9c6 100644
> --- a/src/openvpn/openvpn.vcxproj
> +++ b/src/openvpn/openvpn.vcxproj
> @@ -38,33 +38,39 @@
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>NotSet</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>NotSet</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>NotSet</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>NotSet</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>NotSet</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>NotSet</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
>    <ImportGroup Label="ExtensionSettings">
> @@ -146,6 +152,7 @@
>        <WarningLevel>Level2</WarningLevel>
>        <TreatWarningAsError>true</TreatWarningAsError>
>        <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> +      <ControlFlowGuard>Guard</ControlFlowGuard>
>      </ClCompile>
>      <ResourceCompile />
>      <Link>
> @@ -161,6 +168,7 @@
>        <WarningLevel>Level2</WarningLevel>
>        <TreatWarningAsError>true</TreatWarningAsError>
>        <AdditionalIncludeDirectories>..\compat;$(SolutionDir)include;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> +      <ControlFlowGuard>Guard</ControlFlowGuard>
>      </ClCompile>
>      <ResourceCompile />
>      <Link>
> @@ -176,6 +184,7 @@
>        <WarningLevel>Level2</WarningLevel>
>        <TreatWarningAsError>true</TreatWarningAsError>
>        <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> +      <ControlFlowGuard>Guard</ControlFlowGuard>
>      </ClCompile>
>      <ResourceCompile />
>      <Link>
> @@ -191,6 +200,7 @@
>        <WarningLevel>Level2</WarningLevel>
>        <TreatWarningAsError>true</TreatWarningAsError>
>        <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> +      <ControlFlowGuard>Guard</ControlFlowGuard>
>      </ClCompile>
>      <ResourceCompile />
>      <Link>
> @@ -206,6 +216,7 @@
>        <WarningLevel>Level2</WarningLevel>
>        <TreatWarningAsError>true</TreatWarningAsError>
>        <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> +      <ControlFlowGuard>Guard</ControlFlowGuard>
>      </ClCompile>
>      <ResourceCompile />
>      <Link>
> @@ -221,6 +232,7 @@
>        <WarningLevel>Level2</WarningLevel>
>        <TreatWarningAsError>true</TreatWarningAsError>
>        <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> +      <ControlFlowGuard>Guard</ControlFlowGuard>
>      </ClCompile>
>      <ResourceCompile />
>      <Link>
> diff --git a/src/openvpnmsica/openvpnmsica.props b/src/openvpnmsica/openvpnmsica.props
> index 074635d0..9e934a73 100644
> --- a/src/openvpnmsica/openvpnmsica.props
> +++ b/src/openvpnmsica/openvpnmsica.props
> @@ -9,6 +9,7 @@
>      <ClCompile>
>        <AdditionalIncludeDirectories>..\compat;$(TAP_WINDOWS_HOME)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
>        <PreprocessorDefinitions>_WIN32_WINNT=_WIN32_WINNT_VISTA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
> +      <ControlFlowGuard>Guard</ControlFlowGuard>
>      </ClCompile>
>      <Link>
>        <SubSystem>Windows</SubSystem>
> diff --git a/src/openvpnmsica/openvpnmsica.vcxproj b/src/openvpnmsica/openvpnmsica.vcxproj
> index c39b1240..11aa78bb 100644
> --- a/src/openvpnmsica/openvpnmsica.vcxproj
> +++ b/src/openvpnmsica/openvpnmsica.vcxproj
> @@ -40,18 +40,21 @@
>      <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
>      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
>      <UseDebugLibraries>true</UseDebugLibraries>
>      <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
>      <UseDebugLibraries>true</UseDebugLibraries>
>      <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
> @@ -60,6 +63,7 @@
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
>      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
> @@ -67,6 +71,7 @@
>      <PlatformToolset>v142</PlatformToolset>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
> @@ -74,6 +79,7 @@
>      <PlatformToolset>v142</PlatformToolset>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
>    <ImportGroup Label="ExtensionSettings">
> diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj
> index 8009ab3d..5fd7d60b 100644
> --- a/src/openvpnserv/openvpnserv.vcxproj
> +++ b/src/openvpnserv/openvpnserv.vcxproj
> @@ -38,33 +38,39 @@
>      <CharacterSet>Unicode</CharacterSet>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
>      <PlatformToolset>v142</PlatformToolset>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
>    <ImportGroup Label="ExtensionSettings">
> diff --git a/src/tapctl/tapctl.vcxproj b/src/tapctl/tapctl.vcxproj
> index ad96f02c..79da9d33 100644
> --- a/src/tapctl/tapctl.vcxproj
> +++ b/src/tapctl/tapctl.vcxproj
> @@ -40,18 +40,21 @@
>      <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
>      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <UseDebugLibraries>true</UseDebugLibraries>
>      <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <UseDebugLibraries>true</UseDebugLibraries>
>      <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
> @@ -60,6 +63,7 @@
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
>      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
> @@ -67,6 +71,7 @@
>      <PlatformToolset>v142</PlatformToolset>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
> @@ -74,6 +79,7 @@
>      <PlatformToolset>v142</PlatformToolset>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
> +    <SpectreMitigation>Spectre</SpectreMitigation>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
>    <ImportGroup Label="ExtensionSettings">
> --
> 2.29.2.windows.2
>
>
>
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Ilya Shipitsin Sept. 21, 2021, 12:04 p.m. | #2
thanks,

I'll recheck and will send v2 soon

вт, 21 сент. 2021 г. в 16:49, Lev Stipakov <lstipakov@gmail.com>:

> Hi,
>
> Sorry for the delay.
>
> I got "command line error D8016: '/ZI' and '/guard:cf' command-line
> options are incompatible" errors for Debug configuration,
> Release works fine. Looks like "Debug Information Format: Program
> Database for Edit and Continue" is not compatible with Control Flow
> Guard:
>
>
> https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-control-flow-guard?view=msvc-160
>
> Let's apply those changes to Release configurations only.
>
> ke 15. syysk. 2021 klo 15.27 Ilya Shipitsin (chipitsine@gmail.com)
> kirjoitti:
> >
> > found by BinSkim
> >
> > Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
> > ---
> >  src/compat/Debug.props                |  1 +
> >  src/compat/Release.props              |  1 +
> >  src/compat/compat.vcxproj             |  6 ++++++
> >  src/openvpn/openvpn.vcxproj           | 12 ++++++++++++
> >  src/openvpnmsica/openvpnmsica.props   |  1 +
> >  src/openvpnmsica/openvpnmsica.vcxproj |  6 ++++++
> >  src/openvpnserv/openvpnserv.vcxproj   |  6 ++++++
> >  src/tapctl/tapctl.vcxproj             |  6 ++++++
> >  8 files changed, 39 insertions(+)
> >
> > diff --git a/src/compat/Debug.props b/src/compat/Debug.props
> > index 31bb9d91..810609bf 100644
> > --- a/src/compat/Debug.props
> > +++ b/src/compat/Debug.props
> > @@ -15,6 +15,7 @@
> >
> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
> >        <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
> >        <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
> > +      <ControlFlowGuard>Guard</ControlFlowGuard>
> >      </ClCompile>
> >    </ItemDefinitionGroup>
> >    <ItemGroup />
> > diff --git a/src/compat/Release.props b/src/compat/Release.props
> > index 63828b79..50eaa8de 100644
> > --- a/src/compat/Release.props
> > +++ b/src/compat/Release.props
> > @@ -15,6 +15,7 @@
> >        <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
> >        <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
> >
> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
> > +      <ControlFlowGuard>Guard</ControlFlowGuard>
> >      </ClCompile>
> >      <Link>
> >        <EnableCOMDATFolding>true</EnableCOMDATFolding>
> > diff --git a/src/compat/compat.vcxproj b/src/compat/compat.vcxproj
> > index 49824783..fe03a51a 100644
> > --- a/src/compat/compat.vcxproj
> > +++ b/src/compat/compat.vcxproj
> > @@ -38,33 +38,39 @@
> >      <CharacterSet>MultiByte</CharacterSet>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'"
> Label="Configuration">
> >      <ConfigurationType>StaticLibrary</ConfigurationType>
> >      <CharacterSet>MultiByte</CharacterSet>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"
> Label="Configuration">
> >      <ConfigurationType>StaticLibrary</ConfigurationType>
> >      <CharacterSet>MultiByte</CharacterSet>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
> Label="Configuration">
> >      <ConfigurationType>StaticLibrary</ConfigurationType>
> >      <CharacterSet>MultiByte</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"
> Label="Configuration">
> >      <ConfigurationType>StaticLibrary</ConfigurationType>
> >      <CharacterSet>MultiByte</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"
> Label="Configuration">
> >      <ConfigurationType>StaticLibrary</ConfigurationType>
> >      <CharacterSet>MultiByte</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
> >    <ImportGroup Label="ExtensionSettings">
> > diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
> > index 5b3e0c6c..8d27f9c6 100644
> > --- a/src/openvpn/openvpn.vcxproj
> > +++ b/src/openvpn/openvpn.vcxproj
> > @@ -38,33 +38,39 @@
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <CharacterSet>NotSet</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <CharacterSet>NotSet</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <CharacterSet>NotSet</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <CharacterSet>NotSet</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <CharacterSet>NotSet</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <CharacterSet>NotSet</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
> >    <ImportGroup Label="ExtensionSettings">
> > @@ -146,6 +152,7 @@
> >        <WarningLevel>Level2</WarningLevel>
> >        <TreatWarningAsError>true</TreatWarningAsError>
> >
> <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> > +      <ControlFlowGuard>Guard</ControlFlowGuard>
> >      </ClCompile>
> >      <ResourceCompile />
> >      <Link>
> > @@ -161,6 +168,7 @@
> >        <WarningLevel>Level2</WarningLevel>
> >        <TreatWarningAsError>true</TreatWarningAsError>
> >
> <AdditionalIncludeDirectories>..\compat;$(SolutionDir)include;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> > +      <ControlFlowGuard>Guard</ControlFlowGuard>
> >      </ClCompile>
> >      <ResourceCompile />
> >      <Link>
> > @@ -176,6 +184,7 @@
> >        <WarningLevel>Level2</WarningLevel>
> >        <TreatWarningAsError>true</TreatWarningAsError>
> >
> <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> > +      <ControlFlowGuard>Guard</ControlFlowGuard>
> >      </ClCompile>
> >      <ResourceCompile />
> >      <Link>
> > @@ -191,6 +200,7 @@
> >        <WarningLevel>Level2</WarningLevel>
> >        <TreatWarningAsError>true</TreatWarningAsError>
> >
> <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> > +      <ControlFlowGuard>Guard</ControlFlowGuard>
> >      </ClCompile>
> >      <ResourceCompile />
> >      <Link>
> > @@ -206,6 +216,7 @@
> >        <WarningLevel>Level2</WarningLevel>
> >        <TreatWarningAsError>true</TreatWarningAsError>
> >
> <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> > +      <ControlFlowGuard>Guard</ControlFlowGuard>
> >      </ClCompile>
> >      <ResourceCompile />
> >      <Link>
> > @@ -221,6 +232,7 @@
> >        <WarningLevel>Level2</WarningLevel>
> >        <TreatWarningAsError>true</TreatWarningAsError>
> >
> <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> > +      <ControlFlowGuard>Guard</ControlFlowGuard>
> >      </ClCompile>
> >      <ResourceCompile />
> >      <Link>
> > diff --git a/src/openvpnmsica/openvpnmsica.props
> b/src/openvpnmsica/openvpnmsica.props
> > index 074635d0..9e934a73 100644
> > --- a/src/openvpnmsica/openvpnmsica.props
> > +++ b/src/openvpnmsica/openvpnmsica.props
> > @@ -9,6 +9,7 @@
> >      <ClCompile>
> >
> <AdditionalIncludeDirectories>..\compat;$(TAP_WINDOWS_HOME)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
> >
> <PreprocessorDefinitions>_WIN32_WINNT=_WIN32_WINNT_VISTA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
> > +      <ControlFlowGuard>Guard</ControlFlowGuard>
> >      </ClCompile>
> >      <Link>
> >        <SubSystem>Windows</SubSystem>
> > diff --git a/src/openvpnmsica/openvpnmsica.vcxproj
> b/src/openvpnmsica/openvpnmsica.vcxproj
> > index c39b1240..11aa78bb 100644
> > --- a/src/openvpnmsica/openvpnmsica.vcxproj
> > +++ b/src/openvpnmsica/openvpnmsica.vcxproj
> > @@ -40,18 +40,21 @@
> >      <PlatformToolset>v142</PlatformToolset>
> >      <CharacterSet>Unicode</CharacterSet>
> >      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
> Label="Configuration">
> >      <ConfigurationType>DynamicLibrary</ConfigurationType>
> >      <UseDebugLibraries>true</UseDebugLibraries>
> >      <PlatformToolset>v142</PlatformToolset>
> >      <CharacterSet>Unicode</CharacterSet>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"
> Label="Configuration">
> >      <ConfigurationType>DynamicLibrary</ConfigurationType>
> >      <UseDebugLibraries>true</UseDebugLibraries>
> >      <PlatformToolset>v142</PlatformToolset>
> >      <CharacterSet>Unicode</CharacterSet>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"
> Label="Configuration">
> >      <ConfigurationType>DynamicLibrary</ConfigurationType>
> > @@ -60,6 +63,7 @@
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <CharacterSet>Unicode</CharacterSet>
> >      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"
> Label="Configuration">
> >      <ConfigurationType>DynamicLibrary</ConfigurationType>
> > @@ -67,6 +71,7 @@
> >      <PlatformToolset>v142</PlatformToolset>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <CharacterSet>Unicode</CharacterSet>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'"
> Label="Configuration">
> >      <ConfigurationType>DynamicLibrary</ConfigurationType>
> > @@ -74,6 +79,7 @@
> >      <PlatformToolset>v142</PlatformToolset>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <CharacterSet>Unicode</CharacterSet>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
> >    <ImportGroup Label="ExtensionSettings">
> > diff --git a/src/openvpnserv/openvpnserv.vcxproj
> b/src/openvpnserv/openvpnserv.vcxproj
> > index 8009ab3d..5fd7d60b 100644
> > --- a/src/openvpnserv/openvpnserv.vcxproj
> > +++ b/src/openvpnserv/openvpnserv.vcxproj
> > @@ -38,33 +38,39 @@
> >      <CharacterSet>Unicode</CharacterSet>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <CharacterSet>Unicode</CharacterSet>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <CharacterSet>Unicode</CharacterSet>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <CharacterSet>Unicode</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <CharacterSet>Unicode</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <CharacterSet>Unicode</CharacterSet>
> >      <PlatformToolset>v142</PlatformToolset>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
> >    <ImportGroup Label="ExtensionSettings">
> > diff --git a/src/tapctl/tapctl.vcxproj b/src/tapctl/tapctl.vcxproj
> > index ad96f02c..79da9d33 100644
> > --- a/src/tapctl/tapctl.vcxproj
> > +++ b/src/tapctl/tapctl.vcxproj
> > @@ -40,18 +40,21 @@
> >      <PlatformToolset>v142</PlatformToolset>
> >      <CharacterSet>Unicode</CharacterSet>
> >      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <UseDebugLibraries>true</UseDebugLibraries>
> >      <PlatformToolset>v142</PlatformToolset>
> >      <CharacterSet>Unicode</CharacterSet>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> >      <UseDebugLibraries>true</UseDebugLibraries>
> >      <PlatformToolset>v142</PlatformToolset>
> >      <CharacterSet>Unicode</CharacterSet>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> > @@ -60,6 +63,7 @@
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <CharacterSet>Unicode</CharacterSet>
> >      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> > @@ -67,6 +71,7 @@
> >      <PlatformToolset>v142</PlatformToolset>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <CharacterSet>Unicode</CharacterSet>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'"
> Label="Configuration">
> >      <ConfigurationType>Application</ConfigurationType>
> > @@ -74,6 +79,7 @@
> >      <PlatformToolset>v142</PlatformToolset>
> >      <WholeProgramOptimization>true</WholeProgramOptimization>
> >      <CharacterSet>Unicode</CharacterSet>
> > +    <SpectreMitigation>Spectre</SpectreMitigation>
> >    </PropertyGroup>
> >    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
> >    <ImportGroup Label="ExtensionSettings">
> > --
> > 2.29.2.windows.2
> >
> >
> >
> > _______________________________________________
> > Openvpn-devel mailing list
> > Openvpn-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/openvpn-devel
>
>
>
> --
> -Lev
>
<div dir="ltr"><div>thanks,</div><div><br></div><div>I&#39;ll recheck and will send v2 soon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вт, 21 сент. 2021 г. в 16:49, Lev Stipakov &lt;<a href="mailto:lstipakov@gmail.com">lstipakov@gmail.com</a>&gt;:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Sorry for the delay.<br>
<br>
I got &quot;command line error D8016: &#39;/ZI&#39; and &#39;/guard:cf&#39; command-line<br>
options are incompatible&quot; errors for Debug configuration,<br>
Release works fine. Looks like &quot;Debug Information Format: Program<br>
Database for Edit and Continue&quot; is not compatible with Control Flow<br>
Guard:<br>
<br>
<a href="https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-control-flow-guard?view=msvc-160" rel="noreferrer" target="_blank">https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-control-flow-guard?view=msvc-160</a><br>
<br>
Let&#39;s apply those changes to Release configurations only.<br>
<br>
ke 15. syysk. 2021 klo 15.27 Ilya Shipitsin (<a href="mailto:chipitsine@gmail.com" target="_blank">chipitsine@gmail.com</a>) kirjoitti:<br>
&gt;<br>
&gt; found by BinSkim<br>
&gt;<br>
&gt; Signed-off-by: Ilya Shipitsin &lt;<a href="mailto:chipitsine@gmail.com" target="_blank">chipitsine@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  src/compat/Debug.props                |  1 +<br>
&gt;  src/compat/Release.props              |  1 +<br>
&gt;  src/compat/compat.vcxproj             |  6 ++++++<br>
&gt;  src/openvpn/openvpn.vcxproj           | 12 ++++++++++++<br>
&gt;  src/openvpnmsica/openvpnmsica.props   |  1 +<br>
&gt;  src/openvpnmsica/openvpnmsica.vcxproj |  6 ++++++<br>
&gt;  src/openvpnserv/openvpnserv.vcxproj   |  6 ++++++<br>
&gt;  src/tapctl/tapctl.vcxproj             |  6 ++++++<br>
&gt;  8 files changed, 39 insertions(+)<br>
&gt;<br>
&gt; diff --git a/src/compat/Debug.props b/src/compat/Debug.props<br>
&gt; index 31bb9d91..810609bf 100644<br>
&gt; --- a/src/compat/Debug.props<br>
&gt; +++ b/src/compat/Debug.props<br>
&gt; @@ -15,6 +15,7 @@<br>
&gt;        &lt;PreprocessorDefinitions&gt;_DEBUG;%(PreprocessorDefinitions)&lt;/PreprocessorDefinitions&gt;<br>
&gt;        &lt;RuntimeLibrary&gt;MultiThreadedDebugDLL&lt;/RuntimeLibrary&gt;<br>
&gt;        &lt;DebugInformationFormat&gt;EditAndContinue&lt;/DebugInformationFormat&gt;<br>
&gt; +      &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;      &lt;/ClCompile&gt;<br>
&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;    &lt;ItemGroup /&gt;<br>
&gt; diff --git a/src/compat/Release.props b/src/compat/Release.props<br>
&gt; index 63828b79..50eaa8de 100644<br>
&gt; --- a/src/compat/Release.props<br>
&gt; +++ b/src/compat/Release.props<br>
&gt; @@ -15,6 +15,7 @@<br>
&gt;        &lt;RuntimeLibrary&gt;MultiThreadedDLL&lt;/RuntimeLibrary&gt;<br>
&gt;        &lt;DebugInformationFormat&gt;ProgramDatabase&lt;/DebugInformationFormat&gt;<br>
&gt;        &lt;PreprocessorDefinitions&gt;NDEBUG;%(PreprocessorDefinitions)&lt;/PreprocessorDefinitions&gt;<br>
&gt; +      &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;      &lt;/ClCompile&gt;<br>
&gt;      &lt;Link&gt;<br>
&gt;        &lt;EnableCOMDATFolding&gt;true&lt;/EnableCOMDATFolding&gt;<br>
&gt; diff --git a/src/compat/compat.vcxproj b/src/compat/compat.vcxproj<br>
&gt; index 49824783..fe03a51a 100644<br>
&gt; --- a/src/compat/compat.vcxproj<br>
&gt; +++ b/src/compat/compat.vcxproj<br>
&gt; @@ -38,33 +38,39 @@<br>
&gt;      &lt;CharacterSet&gt;MultiByte&lt;/CharacterSet&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;StaticLibrary&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;MultiByte&lt;/CharacterSet&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;StaticLibrary&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;MultiByte&lt;/CharacterSet&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;StaticLibrary&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;MultiByte&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;StaticLibrary&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;MultiByte&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|ARM64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;StaticLibrary&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;MultiByte&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;Import Project=&quot;$(VCTargetsPath)\Microsoft.Cpp.props&quot; /&gt;<br>
&gt;    &lt;ImportGroup Label=&quot;ExtensionSettings&quot;&gt;<br>
&gt; diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj<br>
&gt; index 5b3e0c6c..8d27f9c6 100644<br>
&gt; --- a/src/openvpn/openvpn.vcxproj<br>
&gt; +++ b/src/openvpn/openvpn.vcxproj<br>
&gt; @@ -38,33 +38,39 @@<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;CharacterSet&gt;NotSet&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;CharacterSet&gt;NotSet&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;CharacterSet&gt;NotSet&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;NotSet&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;NotSet&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|ARM64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;NotSet&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;Import Project=&quot;$(VCTargetsPath)\Microsoft.Cpp.props&quot; /&gt;<br>
&gt;    &lt;ImportGroup Label=&quot;ExtensionSettings&quot;&gt;<br>
&gt; @@ -146,6 +152,7 @@<br>
&gt;        &lt;WarningLevel&gt;Level2&lt;/WarningLevel&gt;<br>
&gt;        &lt;TreatWarningAsError&gt;true&lt;/TreatWarningAsError&gt;<br>
&gt;        &lt;AdditionalIncludeDirectories&gt;..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;<br>
&gt; +      &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;      &lt;/ClCompile&gt;<br>
&gt;      &lt;ResourceCompile /&gt;<br>
&gt;      &lt;Link&gt;<br>
&gt; @@ -161,6 +168,7 @@<br>
&gt;        &lt;WarningLevel&gt;Level2&lt;/WarningLevel&gt;<br>
&gt;        &lt;TreatWarningAsError&gt;true&lt;/TreatWarningAsError&gt;<br>
&gt;        &lt;AdditionalIncludeDirectories&gt;..\compat;$(SolutionDir)include;$(SolutionDir);%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;<br>
&gt; +      &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;      &lt;/ClCompile&gt;<br>
&gt;      &lt;ResourceCompile /&gt;<br>
&gt;      &lt;Link&gt;<br>
&gt; @@ -176,6 +184,7 @@<br>
&gt;        &lt;WarningLevel&gt;Level2&lt;/WarningLevel&gt;<br>
&gt;        &lt;TreatWarningAsError&gt;true&lt;/TreatWarningAsError&gt;<br>
&gt;        &lt;AdditionalIncludeDirectories&gt;..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;<br>
&gt; +      &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;      &lt;/ClCompile&gt;<br>
&gt;      &lt;ResourceCompile /&gt;<br>
&gt;      &lt;Link&gt;<br>
&gt; @@ -191,6 +200,7 @@<br>
&gt;        &lt;WarningLevel&gt;Level2&lt;/WarningLevel&gt;<br>
&gt;        &lt;TreatWarningAsError&gt;true&lt;/TreatWarningAsError&gt;<br>
&gt;        &lt;AdditionalIncludeDirectories&gt;..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;<br>
&gt; +      &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;      &lt;/ClCompile&gt;<br>
&gt;      &lt;ResourceCompile /&gt;<br>
&gt;      &lt;Link&gt;<br>
&gt; @@ -206,6 +216,7 @@<br>
&gt;        &lt;WarningLevel&gt;Level2&lt;/WarningLevel&gt;<br>
&gt;        &lt;TreatWarningAsError&gt;true&lt;/TreatWarningAsError&gt;<br>
&gt;        &lt;AdditionalIncludeDirectories&gt;..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;<br>
&gt; +      &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;      &lt;/ClCompile&gt;<br>
&gt;      &lt;ResourceCompile /&gt;<br>
&gt;      &lt;Link&gt;<br>
&gt; @@ -221,6 +232,7 @@<br>
&gt;        &lt;WarningLevel&gt;Level2&lt;/WarningLevel&gt;<br>
&gt;        &lt;TreatWarningAsError&gt;true&lt;/TreatWarningAsError&gt;<br>
&gt;        &lt;AdditionalIncludeDirectories&gt;..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;<br>
&gt; +      &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;      &lt;/ClCompile&gt;<br>
&gt;      &lt;ResourceCompile /&gt;<br>
&gt;      &lt;Link&gt;<br>
&gt; diff --git a/src/openvpnmsica/openvpnmsica.props b/src/openvpnmsica/openvpnmsica.props<br>
&gt; index 074635d0..9e934a73 100644<br>
&gt; --- a/src/openvpnmsica/openvpnmsica.props<br>
&gt; +++ b/src/openvpnmsica/openvpnmsica.props<br>
&gt; @@ -9,6 +9,7 @@<br>
&gt;      &lt;ClCompile&gt;<br>
&gt;        &lt;AdditionalIncludeDirectories&gt;..\compat;$(TAP_WINDOWS_HOME)/include;%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;<br>
&gt;        &lt;PreprocessorDefinitions&gt;_WIN32_WINNT=_WIN32_WINNT_VISTA;%(PreprocessorDefinitions)&lt;/PreprocessorDefinitions&gt;<br>
&gt; +      &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;      &lt;/ClCompile&gt;<br>
&gt;      &lt;Link&gt;<br>
&gt;        &lt;SubSystem&gt;Windows&lt;/SubSystem&gt;<br>
&gt; diff --git a/src/openvpnmsica/openvpnmsica.vcxproj b/src/openvpnmsica/openvpnmsica.vcxproj<br>
&gt; index c39b1240..11aa78bb 100644<br>
&gt; --- a/src/openvpnmsica/openvpnmsica.vcxproj<br>
&gt; +++ b/src/openvpnmsica/openvpnmsica.vcxproj<br>
&gt; @@ -40,18 +40,21 @@<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt;      &lt;WindowsSDKDesktopARM64Support&gt;true&lt;/WindowsSDKDesktopARM64Support&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;DynamicLibrary&lt;/ConfigurationType&gt;<br>
&gt;      &lt;UseDebugLibraries&gt;true&lt;/UseDebugLibraries&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;DynamicLibrary&lt;/ConfigurationType&gt;<br>
&gt;      &lt;UseDebugLibraries&gt;true&lt;/UseDebugLibraries&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;DynamicLibrary&lt;/ConfigurationType&gt;<br>
&gt; @@ -60,6 +63,7 @@<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt;      &lt;WindowsSDKDesktopARM64Support&gt;true&lt;/WindowsSDKDesktopARM64Support&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|Win32&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;DynamicLibrary&lt;/ConfigurationType&gt;<br>
&gt; @@ -67,6 +71,7 @@<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;DynamicLibrary&lt;/ConfigurationType&gt;<br>
&gt; @@ -74,6 +79,7 @@<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;Import Project=&quot;$(VCTargetsPath)\Microsoft.Cpp.props&quot; /&gt;<br>
&gt;    &lt;ImportGroup Label=&quot;ExtensionSettings&quot;&gt;<br>
&gt; diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj<br>
&gt; index 8009ab3d..5fd7d60b 100644<br>
&gt; --- a/src/openvpnserv/openvpnserv.vcxproj<br>
&gt; +++ b/src/openvpnserv/openvpnserv.vcxproj<br>
&gt; @@ -38,33 +38,39 @@<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|ARM64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;Import Project=&quot;$(VCTargetsPath)\Microsoft.Cpp.props&quot; /&gt;<br>
&gt;    &lt;ImportGroup Label=&quot;ExtensionSettings&quot;&gt;<br>
&gt; diff --git a/src/tapctl/tapctl.vcxproj b/src/tapctl/tapctl.vcxproj<br>
&gt; index ad96f02c..79da9d33 100644<br>
&gt; --- a/src/tapctl/tapctl.vcxproj<br>
&gt; +++ b/src/tapctl/tapctl.vcxproj<br>
&gt; @@ -40,18 +40,21 @@<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt;      &lt;WindowsSDKDesktopARM64Support&gt;true&lt;/WindowsSDKDesktopARM64Support&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;UseDebugLibraries&gt;true&lt;/UseDebugLibraries&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt;      &lt;UseDebugLibraries&gt;true&lt;/UseDebugLibraries&gt;<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt; @@ -60,6 +63,7 @@<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt;      &lt;WindowsSDKDesktopARM64Support&gt;true&lt;/WindowsSDKDesktopARM64Support&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|Win32&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt; @@ -67,6 +71,7 @@<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;PropertyGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot; Label=&quot;Configuration&quot;&gt;<br>
&gt;      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;<br>
&gt; @@ -74,6 +79,7 @@<br>
&gt;      &lt;PlatformToolset&gt;v142&lt;/PlatformToolset&gt;<br>
&gt;      &lt;WholeProgramOptimization&gt;true&lt;/WholeProgramOptimization&gt;<br>
&gt;      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;<br>
&gt; +    &lt;SpectreMitigation&gt;Spectre&lt;/SpectreMitigation&gt;<br>
&gt;    &lt;/PropertyGroup&gt;<br>
&gt;    &lt;Import Project=&quot;$(VCTargetsPath)\Microsoft.Cpp.props&quot; /&gt;<br>
&gt;    &lt;ImportGroup Label=&quot;ExtensionSettings&quot;&gt;<br>
&gt; --<br>
&gt; 2.29.2.windows.2<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Openvpn-devel mailing list<br>
&gt; <a href="mailto:Openvpn-devel@lists.sourceforge.net" target="_blank">Openvpn-devel@lists.sourceforge.net</a><br>
&gt; <a href="https://lists.sourceforge.net/lists/listinfo/openvpn-devel" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/openvpn-devel</a><br>
<br>
<br>
<br>
-- <br>
-Lev<br>
</blockquote></div>

Patch

diff --git a/src/compat/Debug.props b/src/compat/Debug.props
index 31bb9d91..810609bf 100644
--- a/src/compat/Debug.props
+++ b/src/compat/Debug.props
@@ -15,6 +15,7 @@ 
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemGroup />
diff --git a/src/compat/Release.props b/src/compat/Release.props
index 63828b79..50eaa8de 100644
--- a/src/compat/Release.props
+++ b/src/compat/Release.props
@@ -15,6 +15,7 @@ 
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
     <Link>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
diff --git a/src/compat/compat.vcxproj b/src/compat/compat.vcxproj
index 49824783..fe03a51a 100644
--- a/src/compat/compat.vcxproj
+++ b/src/compat/compat.vcxproj
@@ -38,33 +38,39 @@ 
     <CharacterSet>MultiByte</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
index 5b3e0c6c..8d27f9c6 100644
--- a/src/openvpn/openvpn.vcxproj
+++ b/src/openvpn/openvpn.vcxproj
@@ -38,33 +38,39 @@ 
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>NotSet</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>NotSet</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>NotSet</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>NotSet</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>NotSet</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>NotSet</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
@@ -146,6 +152,7 @@ 
       <WarningLevel>Level2</WarningLevel>
       <TreatWarningAsError>true</TreatWarningAsError>
       <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
     <ResourceCompile />
     <Link>
@@ -161,6 +168,7 @@ 
       <WarningLevel>Level2</WarningLevel>
       <TreatWarningAsError>true</TreatWarningAsError>
       <AdditionalIncludeDirectories>..\compat;$(SolutionDir)include;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
     <ResourceCompile />
     <Link>
@@ -176,6 +184,7 @@ 
       <WarningLevel>Level2</WarningLevel>
       <TreatWarningAsError>true</TreatWarningAsError>
       <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
     <ResourceCompile />
     <Link>
@@ -191,6 +200,7 @@ 
       <WarningLevel>Level2</WarningLevel>
       <TreatWarningAsError>true</TreatWarningAsError>
       <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
     <ResourceCompile />
     <Link>
@@ -206,6 +216,7 @@ 
       <WarningLevel>Level2</WarningLevel>
       <TreatWarningAsError>true</TreatWarningAsError>
       <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
     <ResourceCompile />
     <Link>
@@ -221,6 +232,7 @@ 
       <WarningLevel>Level2</WarningLevel>
       <TreatWarningAsError>true</TreatWarningAsError>
       <AdditionalIncludeDirectories>..\compat;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
     <ResourceCompile />
     <Link>
diff --git a/src/openvpnmsica/openvpnmsica.props b/src/openvpnmsica/openvpnmsica.props
index 074635d0..9e934a73 100644
--- a/src/openvpnmsica/openvpnmsica.props
+++ b/src/openvpnmsica/openvpnmsica.props
@@ -9,6 +9,7 @@ 
     <ClCompile>
       <AdditionalIncludeDirectories>..\compat;$(TAP_WINDOWS_HOME)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_WIN32_WINNT=_WIN32_WINNT_VISTA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
diff --git a/src/openvpnmsica/openvpnmsica.vcxproj b/src/openvpnmsica/openvpnmsica.vcxproj
index c39b1240..11aa78bb 100644
--- a/src/openvpnmsica/openvpnmsica.vcxproj
+++ b/src/openvpnmsica/openvpnmsica.vcxproj
@@ -40,18 +40,21 @@ 
     <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
     <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
@@ -60,6 +63,7 @@ 
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
@@ -67,6 +71,7 @@ 
     <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
@@ -74,6 +79,7 @@ 
     <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj
index 8009ab3d..5fd7d60b 100644
--- a/src/openvpnserv/openvpnserv.vcxproj
+++ b/src/openvpnserv/openvpnserv.vcxproj
@@ -38,33 +38,39 @@ 
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v142</PlatformToolset>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
diff --git a/src/tapctl/tapctl.vcxproj b/src/tapctl/tapctl.vcxproj
index ad96f02c..79da9d33 100644
--- a/src/tapctl/tapctl.vcxproj
+++ b/src/tapctl/tapctl.vcxproj
@@ -40,18 +40,21 @@ 
     <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
     <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
@@ -60,6 +63,7 @@ 
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
@@ -67,6 +71,7 @@ 
     <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
@@ -74,6 +79,7 @@ 
     <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
+    <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">