[Openvpn-devel] BUILD: MSVC: enable the Control-flow Enforcement Technology (CET) Shadow Stack mitigation

Message ID 20211016141519.1928-1-chipitsine@gmail.com
State Superseded, archived
Headers show
Series
  • [Openvpn-devel] BUILD: MSVC: enable the Control-flow Enforcement Technology (CET) Shadow Stack mitigation
Related show

Commit Message

Илья Шипицин Oct. 16, 2021, 2:15 p.m.
found by BinSkim, more details:
https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160

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

Comments

Илья Шипицин Dec. 27, 2021, 9:07 a.m. | #1
gentle ping


сб, 16 окт. 2021 г. в 19:15, Ilya Shipitsin <chipitsine@gmail.com>:

> found by BinSkim, more details:
>
> https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160
>
> Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
> ---
>  src/compat/Debug.props                      | 10 ++++++++++
>  src/compat/Release.props                    | 10 ++++++++++
>  src/openvpn/openvpn.vcxproj                 |  4 ++++
>  src/openvpnmsica/openvpnmsica-Debug.props   | 10 ++++++++++
>  src/openvpnmsica/openvpnmsica-Release.props | 10 ++++++++++
>  src/openvpnserv/openvpnserv.vcxproj         |  4 ++++
>  6 files changed, 48 insertions(+)
>
> diff --git a/src/compat/Debug.props b/src/compat/Debug.props
> index 31bb9d91..14d7a1f7 100644
> --- a/src/compat/Debug.props
> +++ b/src/compat/Debug.props
> @@ -17,5 +17,15 @@
>        <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
>      </ClCompile>
>    </ItemDefinitionGroup>
> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
> +    <Link>
> +      <CETCompat>true</CETCompat>
> +    </Link>
> +  </ItemDefinitionGroup>
> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
> +    <Link>
> +      <CETCompat>true</CETCompat>
> +    </Link>
> +  </ItemDefinitionGroup>
>    <ItemGroup />
>  </Project>
> \ No newline at end of file
> diff --git a/src/compat/Release.props b/src/compat/Release.props
> index 50eaa8de..df04ddf2 100644
> --- a/src/compat/Release.props
> +++ b/src/compat/Release.props
> @@ -22,5 +22,15 @@
>        <OptimizeReferences>true</OptimizeReferences>
>      </Link>
>    </ItemDefinitionGroup>
> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
> +    <Link>
> +      <CETCompat>true</CETCompat>
> +    </Link>
> +  </ItemDefinitionGroup>
> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
> +    <Link>
> +      <CETCompat>true</CETCompat>
> +    </Link>
> +  </ItemDefinitionGroup>
>    <ItemGroup />
>  </Project>
> \ No newline at end of file
> diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
> index 65ee6839..38dd22de 100644
> --- a/src/openvpn/openvpn.vcxproj
> +++ b/src/openvpn/openvpn.vcxproj
> @@ -158,6 +158,7 @@
>
>  <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>
>  <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>        <SubSystem>Console</SubSystem>
> +      <CETCompat>true</CETCompat>
>      </Link>
>    </ItemDefinitionGroup>
>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
> @@ -173,6 +174,7 @@
>
>  <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>
>  <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>        <SubSystem>Console</SubSystem>
> +      <CETCompat>true</CETCompat>
>      </Link>
>    </ItemDefinitionGroup>
>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
> @@ -204,6 +206,7 @@
>
>  <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>
>  <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>        <SubSystem>Console</SubSystem>
> +      <CETCompat>true</CETCompat>
>      </Link>
>    </ItemDefinitionGroup>
>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
> @@ -220,6 +223,7 @@
>
>  <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>
>  <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>        <SubSystem>Console</SubSystem>
> +      <CETCompat>true</CETCompat>
>      </Link>
>    </ItemDefinitionGroup>
>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
> diff --git a/src/openvpnmsica/openvpnmsica-Debug.props
> b/src/openvpnmsica/openvpnmsica-Debug.props
> index 43532cfe..c99346af 100644
> --- a/src/openvpnmsica/openvpnmsica-Debug.props
> +++ b/src/openvpnmsica/openvpnmsica-Debug.props
> @@ -10,5 +10,15 @@
>        <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
>      </ClCompile>
>    </ItemDefinitionGroup>
> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
> +    <Link>
> +      <CETCompat>true</CETCompat>
> +    </Link>
> +  </ItemDefinitionGroup>
> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
> +    <Link>
> +      <CETCompat>true</CETCompat>
> +    </Link>
> +  </ItemDefinitionGroup>
>    <ItemGroup />
>  </Project>
> \ No newline at end of file
> diff --git a/src/openvpnmsica/openvpnmsica-Release.props
> b/src/openvpnmsica/openvpnmsica-Release.props
> index 47727b35..70f82713 100644
> --- a/src/openvpnmsica/openvpnmsica-Release.props
> +++ b/src/openvpnmsica/openvpnmsica-Release.props
> @@ -11,5 +11,15 @@
>        <ControlFlowGuard>Guard</ControlFlowGuard>
>      </ClCompile>
>    </ItemDefinitionGroup>
> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
> +    <Link>
> +      <CETCompat>true</CETCompat>
> +    </Link>
> +  </ItemDefinitionGroup>
> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
> +    <Link>
> +      <CETCompat>true</CETCompat>
> +    </Link>
> +  </ItemDefinitionGroup>
>    <ItemGroup />
>  </Project>
> \ No newline at end of file
> diff --git a/src/openvpnserv/openvpnserv.vcxproj
> b/src/openvpnserv/openvpnserv.vcxproj
> index 5fd7d60b..65d03e3b 100644
> --- a/src/openvpnserv/openvpnserv.vcxproj
> +++ b/src/openvpnserv/openvpnserv.vcxproj
> @@ -130,6 +130,7 @@
>      <Link>
>
>  <AdditionalDependencies>Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>        <SubSystem>Console</SubSystem>
> +      <CETCompat>true</CETCompat>
>      </Link>
>    </ItemDefinitionGroup>
>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
> @@ -141,6 +142,7 @@
>      <Link>
>
>  <AdditionalDependencies>legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>        <SubSystem>Console</SubSystem>
> +      <CETCompat>true</CETCompat>
>      </Link>
>    </ItemDefinitionGroup>
>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
> @@ -163,6 +165,7 @@
>      <Link>
>
>  <AdditionalDependencies>Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>        <SubSystem>Console</SubSystem>
> +      <CETCompat>true</CETCompat>
>      </Link>
>    </ItemDefinitionGroup>
>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
> @@ -174,6 +177,7 @@
>      <Link>
>
>  <AdditionalDependencies>legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>        <SubSystem>Console</SubSystem>
> +      <CETCompat>true</CETCompat>
>      </Link>
>    </ItemDefinitionGroup>
>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
> --
> 2.29.2.windows.2
>
>
<div dir="ltr"><div dir="ltr"><div dir="ltr"><pre style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,&quot;SF Mono&quot;,Menlo,Consolas,&quot;Liberation Mono&quot;,monospace;font-size:13px;margin-top:10px;margin-bottom:0px;max-width:100%;line-height:1.45;color:rgb(36,41,47);white-space:pre-wrap;overflow:visible;background-color:rgba(234,238,242,0.5)">gentle ping</pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">сб, 16 окт. 2021 г. в 19:15, Ilya Shipitsin &lt;<a href="mailto:chipitsine@gmail.com">chipitsine@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">found by BinSkim, more details:<br>
<a href="https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160" rel="noreferrer" target="_blank">https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160</a><br>
<br>
Signed-off-by: Ilya Shipitsin &lt;<a href="mailto:chipitsine@gmail.com" target="_blank">chipitsine@gmail.com</a>&gt;<br>
---<br>
 src/compat/Debug.props                      | 10 ++++++++++<br>
 src/compat/Release.props                    | 10 ++++++++++<br>
 src/openvpn/openvpn.vcxproj                 |  4 ++++<br>
 src/openvpnmsica/openvpnmsica-Debug.props   | 10 ++++++++++<br>
 src/openvpnmsica/openvpnmsica-Release.props | 10 ++++++++++<br>
 src/openvpnserv/openvpnserv.vcxproj         |  4 ++++<br>
 6 files changed, 48 insertions(+)<br>
<br>
diff --git a/src/compat/Debug.props b/src/compat/Debug.props<br>
index 31bb9d91..14d7a1f7 100644<br>
--- a/src/compat/Debug.props<br>
+++ b/src/compat/Debug.props<br>
@@ -17,5 +17,15 @@<br>
       &lt;DebugInformationFormat&gt;EditAndContinue&lt;/DebugInformationFormat&gt;<br>
     &lt;/ClCompile&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
+  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot;&gt;<br>
+    &lt;Link&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
+    &lt;/Link&gt;<br>
+  &lt;/ItemDefinitionGroup&gt;<br>
+  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
+    &lt;Link&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
+    &lt;/Link&gt;<br>
+  &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemGroup /&gt;<br>
 &lt;/Project&gt;<br>
\ No newline at end of file<br>
diff --git a/src/compat/Release.props b/src/compat/Release.props<br>
index 50eaa8de..df04ddf2 100644<br>
--- a/src/compat/Release.props<br>
+++ b/src/compat/Release.props<br>
@@ -22,5 +22,15 @@<br>
       &lt;OptimizeReferences&gt;true&lt;/OptimizeReferences&gt;<br>
     &lt;/Link&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
+  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|Win32&#39;&quot;&gt;<br>
+    &lt;Link&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
+    &lt;/Link&gt;<br>
+  &lt;/ItemDefinitionGroup&gt;<br>
+  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
+    &lt;Link&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
+    &lt;/Link&gt;<br>
+  &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemGroup /&gt;<br>
 &lt;/Project&gt;<br>
\ No newline at end of file<br>
diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj<br>
index 65ee6839..38dd22de 100644<br>
--- a/src/openvpn/openvpn.vcxproj<br>
+++ b/src/openvpn/openvpn.vcxproj<br>
@@ -158,6 +158,7 @@<br>
       &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
       &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
       &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
     &lt;/Link&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
@@ -173,6 +174,7 @@<br>
       &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
       &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
       &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
     &lt;/Link&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|ARM64&#39;&quot;&gt;<br>
@@ -204,6 +206,7 @@<br>
       &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
       &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
       &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
     &lt;/Link&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
@@ -220,6 +223,7 @@<br>
       &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
       &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
       &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
     &lt;/Link&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot;&gt;<br>
diff --git a/src/openvpnmsica/openvpnmsica-Debug.props b/src/openvpnmsica/openvpnmsica-Debug.props<br>
index 43532cfe..c99346af 100644<br>
--- a/src/openvpnmsica/openvpnmsica-Debug.props<br>
+++ b/src/openvpnmsica/openvpnmsica-Debug.props<br>
@@ -10,5 +10,15 @@<br>
       &lt;RuntimeLibrary&gt;MultiThreadedDebug&lt;/RuntimeLibrary&gt;<br>
     &lt;/ClCompile&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
+  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot;&gt;<br>
+    &lt;Link&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
+    &lt;/Link&gt;<br>
+  &lt;/ItemDefinitionGroup&gt;<br>
+  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
+    &lt;Link&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
+    &lt;/Link&gt;<br>
+  &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemGroup /&gt;<br>
 &lt;/Project&gt;<br>
\ No newline at end of file<br>
diff --git a/src/openvpnmsica/openvpnmsica-Release.props b/src/openvpnmsica/openvpnmsica-Release.props<br>
index 47727b35..70f82713 100644<br>
--- a/src/openvpnmsica/openvpnmsica-Release.props<br>
+++ b/src/openvpnmsica/openvpnmsica-Release.props<br>
@@ -11,5 +11,15 @@<br>
       &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
     &lt;/ClCompile&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
+  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|Win32&#39;&quot;&gt;<br>
+    &lt;Link&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
+    &lt;/Link&gt;<br>
+  &lt;/ItemDefinitionGroup&gt;<br>
+  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
+    &lt;Link&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
+    &lt;/Link&gt;<br>
+  &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemGroup /&gt;<br>
 &lt;/Project&gt;<br>
\ No newline at end of file<br>
diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj<br>
index 5fd7d60b..65d03e3b 100644<br>
--- a/src/openvpnserv/openvpnserv.vcxproj<br>
+++ b/src/openvpnserv/openvpnserv.vcxproj<br>
@@ -130,6 +130,7 @@<br>
     &lt;Link&gt;<br>
       &lt;AdditionalDependencies&gt;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
       &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
     &lt;/Link&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
@@ -141,6 +142,7 @@<br>
     &lt;Link&gt;<br>
       &lt;AdditionalDependencies&gt;legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
       &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
     &lt;/Link&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|ARM64&#39;&quot;&gt;<br>
@@ -163,6 +165,7 @@<br>
     &lt;Link&gt;<br>
       &lt;AdditionalDependencies&gt;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
       &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
     &lt;/Link&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
@@ -174,6 +177,7 @@<br>
     &lt;Link&gt;<br>
       &lt;AdditionalDependencies&gt;legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
       &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
+      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
     &lt;/Link&gt;<br>
   &lt;/ItemDefinitionGroup&gt;<br>
   &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot;&gt;<br>
-- <br>
2.29.2.windows.2<br>
<br>
</blockquote></div></div>
Lev Stipakov Dec. 31, 2021, 2:09 p.m. | #2
Hi,

Sorry for the delay.

 1) Was it really necessary to modify .props? I enabled this via
Linker->Advanced->CET Shadow Stack Compatible and only .vcxproj files
got modified.

 2) I think we could enable it for all binaries
(openvpn/openvpnmsica/openvpnserv/tapctl) for ARM64/WIn32/x64 Release
configurations.

-Lev

ma 27. jouluk. 2021 klo 11.09 Илья Шипицин (chipitsine@gmail.com) kirjoitti:
>
> gentle ping
>
>
> сб, 16 окт. 2021 г. в 19:15, Ilya Shipitsin <chipitsine@gmail.com>:
>>
>> found by BinSkim, more details:
>> https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160
>>
>> Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
>> ---
>>  src/compat/Debug.props                      | 10 ++++++++++
>>  src/compat/Release.props                    | 10 ++++++++++
>>  src/openvpn/openvpn.vcxproj                 |  4 ++++
>>  src/openvpnmsica/openvpnmsica-Debug.props   | 10 ++++++++++
>>  src/openvpnmsica/openvpnmsica-Release.props | 10 ++++++++++
>>  src/openvpnserv/openvpnserv.vcxproj         |  4 ++++
>>  6 files changed, 48 insertions(+)
>>
>> diff --git a/src/compat/Debug.props b/src/compat/Debug.props
>> index 31bb9d91..14d7a1f7 100644
>> --- a/src/compat/Debug.props
>> +++ b/src/compat/Debug.props
>> @@ -17,5 +17,15 @@
>>        <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
>>      </ClCompile>
>>    </ItemDefinitionGroup>
>> +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
>> +    <Link>
>> +      <CETCompat>true</CETCompat>
>> +    </Link>
>> +  </ItemDefinitionGroup>
>> +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
>> +    <Link>
>> +      <CETCompat>true</CETCompat>
>> +    </Link>
>> +  </ItemDefinitionGroup>
>>    <ItemGroup />
>>  </Project>
>> \ No newline at end of file
>> diff --git a/src/compat/Release.props b/src/compat/Release.props
>> index 50eaa8de..df04ddf2 100644
>> --- a/src/compat/Release.props
>> +++ b/src/compat/Release.props
>> @@ -22,5 +22,15 @@
>>        <OptimizeReferences>true</OptimizeReferences>
>>      </Link>
>>    </ItemDefinitionGroup>
>> +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
>> +    <Link>
>> +      <CETCompat>true</CETCompat>
>> +    </Link>
>> +  </ItemDefinitionGroup>
>> +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
>> +    <Link>
>> +      <CETCompat>true</CETCompat>
>> +    </Link>
>> +  </ItemDefinitionGroup>
>>    <ItemGroup />
>>  </Project>
>> \ No newline at end of file
>> diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
>> index 65ee6839..38dd22de 100644
>> --- a/src/openvpn/openvpn.vcxproj
>> +++ b/src/openvpn/openvpn.vcxproj
>> @@ -158,6 +158,7 @@
>>        <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>>        <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>>        <SubSystem>Console</SubSystem>
>> +      <CETCompat>true</CETCompat>
>>      </Link>
>>    </ItemDefinitionGroup>
>>    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
>> @@ -173,6 +174,7 @@
>>        <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>>        <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>>        <SubSystem>Console</SubSystem>
>> +      <CETCompat>true</CETCompat>
>>      </Link>
>>    </ItemDefinitionGroup>
>>    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
>> @@ -204,6 +206,7 @@
>>        <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>>        <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>>        <SubSystem>Console</SubSystem>
>> +      <CETCompat>true</CETCompat>
>>      </Link>
>>    </ItemDefinitionGroup>
>>    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
>> @@ -220,6 +223,7 @@
>>        <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>>        <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>>        <SubSystem>Console</SubSystem>
>> +      <CETCompat>true</CETCompat>
>>      </Link>
>>    </ItemDefinitionGroup>
>>    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
>> diff --git a/src/openvpnmsica/openvpnmsica-Debug.props b/src/openvpnmsica/openvpnmsica-Debug.props
>> index 43532cfe..c99346af 100644
>> --- a/src/openvpnmsica/openvpnmsica-Debug.props
>> +++ b/src/openvpnmsica/openvpnmsica-Debug.props
>> @@ -10,5 +10,15 @@
>>        <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
>>      </ClCompile>
>>    </ItemDefinitionGroup>
>> +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
>> +    <Link>
>> +      <CETCompat>true</CETCompat>
>> +    </Link>
>> +  </ItemDefinitionGroup>
>> +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
>> +    <Link>
>> +      <CETCompat>true</CETCompat>
>> +    </Link>
>> +  </ItemDefinitionGroup>
>>    <ItemGroup />
>>  </Project>
>> \ No newline at end of file
>> diff --git a/src/openvpnmsica/openvpnmsica-Release.props b/src/openvpnmsica/openvpnmsica-Release.props
>> index 47727b35..70f82713 100644
>> --- a/src/openvpnmsica/openvpnmsica-Release.props
>> +++ b/src/openvpnmsica/openvpnmsica-Release.props
>> @@ -11,5 +11,15 @@
>>        <ControlFlowGuard>Guard</ControlFlowGuard>
>>      </ClCompile>
>>    </ItemDefinitionGroup>
>> +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
>> +    <Link>
>> +      <CETCompat>true</CETCompat>
>> +    </Link>
>> +  </ItemDefinitionGroup>
>> +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
>> +    <Link>
>> +      <CETCompat>true</CETCompat>
>> +    </Link>
>> +  </ItemDefinitionGroup>
>>    <ItemGroup />
>>  </Project>
>> \ No newline at end of file
>> diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj
>> index 5fd7d60b..65d03e3b 100644
>> --- a/src/openvpnserv/openvpnserv.vcxproj
>> +++ b/src/openvpnserv/openvpnserv.vcxproj
>> @@ -130,6 +130,7 @@
>>      <Link>
>>        <AdditionalDependencies>Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>>        <SubSystem>Console</SubSystem>
>> +      <CETCompat>true</CETCompat>
>>      </Link>
>>    </ItemDefinitionGroup>
>>    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
>> @@ -141,6 +142,7 @@
>>      <Link>
>>        <AdditionalDependencies>legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>>        <SubSystem>Console</SubSystem>
>> +      <CETCompat>true</CETCompat>
>>      </Link>
>>    </ItemDefinitionGroup>
>>    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
>> @@ -163,6 +165,7 @@
>>      <Link>
>>        <AdditionalDependencies>Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>>        <SubSystem>Console</SubSystem>
>> +      <CETCompat>true</CETCompat>
>>      </Link>
>>    </ItemDefinitionGroup>
>>    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
>> @@ -174,6 +177,7 @@
>>      <Link>
>>        <AdditionalDependencies>legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>>        <SubSystem>Console</SubSystem>
>> +      <CETCompat>true</CETCompat>
>>      </Link>
>>    </ItemDefinitionGroup>
>>    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
>> --
>> 2.29.2.windows.2
>>
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Илья Шипицин Dec. 31, 2021, 5:35 p.m. | #3
CETCOMPAT is not supported for ARM.
Regarding other arch I do not have particular opinion, I'm fine with either
props or vcxproj approach

On Fri, Dec 31, 2021, 5:09 PM Lev Stipakov <lstipakov@gmail.com> wrote:

> Hi,
>
> Sorry for the delay.
>
>  1) Was it really necessary to modify .props? I enabled this via
> Linker->Advanced->CET Shadow Stack Compatible and only .vcxproj files
> got modified.
>
>  2) I think we could enable it for all binaries
> (openvpn/openvpnmsica/openvpnserv/tapctl) for ARM64/WIn32/x64 Release
> configurations.
>
> -Lev
>
> ma 27. jouluk. 2021 klo 11.09 Илья Шипицин (chipitsine@gmail.com)
> kirjoitti:
> >
> > gentle ping
> >
> >
> > сб, 16 окт. 2021 г. в 19:15, Ilya Shipitsin <chipitsine@gmail.com>:
> >>
> >> found by BinSkim, more details:
> >>
> https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160
> >>
> >> Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
> >> ---
> >>  src/compat/Debug.props                      | 10 ++++++++++
> >>  src/compat/Release.props                    | 10 ++++++++++
> >>  src/openvpn/openvpn.vcxproj                 |  4 ++++
> >>  src/openvpnmsica/openvpnmsica-Debug.props   | 10 ++++++++++
> >>  src/openvpnmsica/openvpnmsica-Release.props | 10 ++++++++++
> >>  src/openvpnserv/openvpnserv.vcxproj         |  4 ++++
> >>  6 files changed, 48 insertions(+)
> >>
> >> diff --git a/src/compat/Debug.props b/src/compat/Debug.props
> >> index 31bb9d91..14d7a1f7 100644
> >> --- a/src/compat/Debug.props
> >> +++ b/src/compat/Debug.props
> >> @@ -17,5 +17,15 @@
> >>        <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
> >>      </ClCompile>
> >>    </ItemDefinitionGroup>
> >> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
> >> +    <Link>
> >> +      <CETCompat>true</CETCompat>
> >> +    </Link>
> >> +  </ItemDefinitionGroup>
> >> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
> >> +    <Link>
> >> +      <CETCompat>true</CETCompat>
> >> +    </Link>
> >> +  </ItemDefinitionGroup>
> >>    <ItemGroup />
> >>  </Project>
> >> \ No newline at end of file
> >> diff --git a/src/compat/Release.props b/src/compat/Release.props
> >> index 50eaa8de..df04ddf2 100644
> >> --- a/src/compat/Release.props
> >> +++ b/src/compat/Release.props
> >> @@ -22,5 +22,15 @@
> >>        <OptimizeReferences>true</OptimizeReferences>
> >>      </Link>
> >>    </ItemDefinitionGroup>
> >> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
> >> +    <Link>
> >> +      <CETCompat>true</CETCompat>
> >> +    </Link>
> >> +  </ItemDefinitionGroup>
> >> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
> >> +    <Link>
> >> +      <CETCompat>true</CETCompat>
> >> +    </Link>
> >> +  </ItemDefinitionGroup>
> >>    <ItemGroup />
> >>  </Project>
> >> \ No newline at end of file
> >> diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
> >> index 65ee6839..38dd22de 100644
> >> --- a/src/openvpn/openvpn.vcxproj
> >> +++ b/src/openvpn/openvpn.vcxproj
> >> @@ -158,6 +158,7 @@
> >>
> <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
> >>
> <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
> >>        <SubSystem>Console</SubSystem>
> >> +      <CETCompat>true</CETCompat>
> >>      </Link>
> >>    </ItemDefinitionGroup>
> >>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
> >> @@ -173,6 +174,7 @@
> >>
> <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
> >>
> <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
> >>        <SubSystem>Console</SubSystem>
> >> +      <CETCompat>true</CETCompat>
> >>      </Link>
> >>    </ItemDefinitionGroup>
> >>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
> >> @@ -204,6 +206,7 @@
> >>
> <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
> >>
> <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
> >>        <SubSystem>Console</SubSystem>
> >> +      <CETCompat>true</CETCompat>
> >>      </Link>
> >>    </ItemDefinitionGroup>
> >>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
> >> @@ -220,6 +223,7 @@
> >>
> <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
> >>
> <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
> >>        <SubSystem>Console</SubSystem>
> >> +      <CETCompat>true</CETCompat>
> >>      </Link>
> >>    </ItemDefinitionGroup>
> >>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
> >> diff --git a/src/openvpnmsica/openvpnmsica-Debug.props
> b/src/openvpnmsica/openvpnmsica-Debug.props
> >> index 43532cfe..c99346af 100644
> >> --- a/src/openvpnmsica/openvpnmsica-Debug.props
> >> +++ b/src/openvpnmsica/openvpnmsica-Debug.props
> >> @@ -10,5 +10,15 @@
> >>        <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
> >>      </ClCompile>
> >>    </ItemDefinitionGroup>
> >> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
> >> +    <Link>
> >> +      <CETCompat>true</CETCompat>
> >> +    </Link>
> >> +  </ItemDefinitionGroup>
> >> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
> >> +    <Link>
> >> +      <CETCompat>true</CETCompat>
> >> +    </Link>
> >> +  </ItemDefinitionGroup>
> >>    <ItemGroup />
> >>  </Project>
> >> \ No newline at end of file
> >> diff --git a/src/openvpnmsica/openvpnmsica-Release.props
> b/src/openvpnmsica/openvpnmsica-Release.props
> >> index 47727b35..70f82713 100644
> >> --- a/src/openvpnmsica/openvpnmsica-Release.props
> >> +++ b/src/openvpnmsica/openvpnmsica-Release.props
> >> @@ -11,5 +11,15 @@
> >>        <ControlFlowGuard>Guard</ControlFlowGuard>
> >>      </ClCompile>
> >>    </ItemDefinitionGroup>
> >> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
> >> +    <Link>
> >> +      <CETCompat>true</CETCompat>
> >> +    </Link>
> >> +  </ItemDefinitionGroup>
> >> +  <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
> >> +    <Link>
> >> +      <CETCompat>true</CETCompat>
> >> +    </Link>
> >> +  </ItemDefinitionGroup>
> >>    <ItemGroup />
> >>  </Project>
> >> \ No newline at end of file
> >> diff --git a/src/openvpnserv/openvpnserv.vcxproj
> b/src/openvpnserv/openvpnserv.vcxproj
> >> index 5fd7d60b..65d03e3b 100644
> >> --- a/src/openvpnserv/openvpnserv.vcxproj
> >> +++ b/src/openvpnserv/openvpnserv.vcxproj
> >> @@ -130,6 +130,7 @@
> >>      <Link>
> >>
> <AdditionalDependencies>Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
> >>        <SubSystem>Console</SubSystem>
> >> +      <CETCompat>true</CETCompat>
> >>      </Link>
> >>    </ItemDefinitionGroup>
> >>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
> >> @@ -141,6 +142,7 @@
> >>      <Link>
> >>
> <AdditionalDependencies>legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
> >>        <SubSystem>Console</SubSystem>
> >> +      <CETCompat>true</CETCompat>
> >>      </Link>
> >>    </ItemDefinitionGroup>
> >>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
> >> @@ -163,6 +165,7 @@
> >>      <Link>
> >>
> <AdditionalDependencies>Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
> >>        <SubSystem>Console</SubSystem>
> >> +      <CETCompat>true</CETCompat>
> >>      </Link>
> >>    </ItemDefinitionGroup>
> >>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
> >> @@ -174,6 +177,7 @@
> >>      <Link>
> >>
> <AdditionalDependencies>legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
> >>        <SubSystem>Console</SubSystem>
> >> +      <CETCompat>true</CETCompat>
> >>      </Link>
> >>    </ItemDefinitionGroup>
> >>    <ItemDefinitionGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
> >> --
> >> 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="auto">CETCOMPAT is not supported for ARM.<div dir="auto">Regarding other arch I do not have particular opinion, I&#39;m fine with either props or vcxproj approach</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 31, 2021, 5:09 PM Lev Stipakov &lt;<a href="mailto:lstipakov@gmail.com">lstipakov@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Sorry for the delay.<br>
<br>
 1) Was it really necessary to modify .props? I enabled this via<br>
Linker-&gt;Advanced-&gt;CET Shadow Stack Compatible and only .vcxproj files<br>
got modified.<br>
<br>
 2) I think we could enable it for all binaries<br>
(openvpn/openvpnmsica/openvpnserv/tapctl) for ARM64/WIn32/x64 Release<br>
configurations.<br>
<br>
-Lev<br>
<br>
ma 27. jouluk. 2021 klo 11.09 Илья Шипицин (<a href="mailto:chipitsine@gmail.com" target="_blank" rel="noreferrer">chipitsine@gmail.com</a>) kirjoitti:<br>
&gt;<br>
&gt; gentle ping<br>
&gt;<br>
&gt;<br>
&gt; сб, 16 окт. 2021 г. в 19:15, Ilya Shipitsin &lt;<a href="mailto:chipitsine@gmail.com" target="_blank" rel="noreferrer">chipitsine@gmail.com</a>&gt;:<br>
&gt;&gt;<br>
&gt;&gt; found by BinSkim, more details:<br>
&gt;&gt; <a href="https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160" rel="noreferrer noreferrer" target="_blank">https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160</a><br>
&gt;&gt;<br>
&gt;&gt; Signed-off-by: Ilya Shipitsin &lt;<a href="mailto:chipitsine@gmail.com" target="_blank" rel="noreferrer">chipitsine@gmail.com</a>&gt;<br>
&gt;&gt; ---<br>
&gt;&gt;  src/compat/Debug.props                      | 10 ++++++++++<br>
&gt;&gt;  src/compat/Release.props                    | 10 ++++++++++<br>
&gt;&gt;  src/openvpn/openvpn.vcxproj                 |  4 ++++<br>
&gt;&gt;  src/openvpnmsica/openvpnmsica-Debug.props   | 10 ++++++++++<br>
&gt;&gt;  src/openvpnmsica/openvpnmsica-Release.props | 10 ++++++++++<br>
&gt;&gt;  src/openvpnserv/openvpnserv.vcxproj         |  4 ++++<br>
&gt;&gt;  6 files changed, 48 insertions(+)<br>
&gt;&gt;<br>
&gt;&gt; diff --git a/src/compat/Debug.props b/src/compat/Debug.props<br>
&gt;&gt; index 31bb9d91..14d7a1f7 100644<br>
&gt;&gt; --- a/src/compat/Debug.props<br>
&gt;&gt; +++ b/src/compat/Debug.props<br>
&gt;&gt; @@ -17,5 +17,15 @@<br>
&gt;&gt;        &lt;DebugInformationFormat&gt;EditAndContinue&lt;/DebugInformationFormat&gt;<br>
&gt;&gt;      &lt;/ClCompile&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemGroup /&gt;<br>
&gt;&gt;  &lt;/Project&gt;<br>
&gt;&gt; \ No newline at end of file<br>
&gt;&gt; diff --git a/src/compat/Release.props b/src/compat/Release.props<br>
&gt;&gt; index 50eaa8de..df04ddf2 100644<br>
&gt;&gt; --- a/src/compat/Release.props<br>
&gt;&gt; +++ b/src/compat/Release.props<br>
&gt;&gt; @@ -22,5 +22,15 @@<br>
&gt;&gt;        &lt;OptimizeReferences&gt;true&lt;/OptimizeReferences&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|Win32&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemGroup /&gt;<br>
&gt;&gt;  &lt;/Project&gt;<br>
&gt;&gt; \ No newline at end of file<br>
&gt;&gt; diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj<br>
&gt;&gt; index 65ee6839..38dd22de 100644<br>
&gt;&gt; --- a/src/openvpn/openvpn.vcxproj<br>
&gt;&gt; +++ b/src/openvpn/openvpn.vcxproj<br>
&gt;&gt; @@ -158,6 +158,7 @@<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
&gt;&gt; @@ -173,6 +174,7 @@<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|ARM64&#39;&quot;&gt;<br>
&gt;&gt; @@ -204,6 +206,7 @@<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
&gt;&gt; @@ -220,6 +223,7 @@<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot;&gt;<br>
&gt;&gt; diff --git a/src/openvpnmsica/openvpnmsica-Debug.props b/src/openvpnmsica/openvpnmsica-Debug.props<br>
&gt;&gt; index 43532cfe..c99346af 100644<br>
&gt;&gt; --- a/src/openvpnmsica/openvpnmsica-Debug.props<br>
&gt;&gt; +++ b/src/openvpnmsica/openvpnmsica-Debug.props<br>
&gt;&gt; @@ -10,5 +10,15 @@<br>
&gt;&gt;        &lt;RuntimeLibrary&gt;MultiThreadedDebug&lt;/RuntimeLibrary&gt;<br>
&gt;&gt;      &lt;/ClCompile&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemGroup /&gt;<br>
&gt;&gt;  &lt;/Project&gt;<br>
&gt;&gt; \ No newline at end of file<br>
&gt;&gt; diff --git a/src/openvpnmsica/openvpnmsica-Release.props b/src/openvpnmsica/openvpnmsica-Release.props<br>
&gt;&gt; index 47727b35..70f82713 100644<br>
&gt;&gt; --- a/src/openvpnmsica/openvpnmsica-Release.props<br>
&gt;&gt; +++ b/src/openvpnmsica/openvpnmsica-Release.props<br>
&gt;&gt; @@ -11,5 +11,15 @@<br>
&gt;&gt;        &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;&gt;      &lt;/ClCompile&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|Win32&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemGroup /&gt;<br>
&gt;&gt;  &lt;/Project&gt;<br>
&gt;&gt; \ No newline at end of file<br>
&gt;&gt; diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj<br>
&gt;&gt; index 5fd7d60b..65d03e3b 100644<br>
&gt;&gt; --- a/src/openvpnserv/openvpnserv.vcxproj<br>
&gt;&gt; +++ b/src/openvpnserv/openvpnserv.vcxproj<br>
&gt;&gt; @@ -130,6 +130,7 @@<br>
&gt;&gt;      &lt;Link&gt;<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
&gt;&gt; @@ -141,6 +142,7 @@<br>
&gt;&gt;      &lt;Link&gt;<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|ARM64&#39;&quot;&gt;<br>
&gt;&gt; @@ -163,6 +165,7 @@<br>
&gt;&gt;      &lt;Link&gt;<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
&gt;&gt; @@ -174,6 +177,7 @@<br>
&gt;&gt;      &lt;Link&gt;<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; 2.29.2.windows.2<br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; Openvpn-devel mailing list<br>
&gt; <a href="mailto:Openvpn-devel@lists.sourceforge.net" target="_blank" rel="noreferrer">Openvpn-devel@lists.sourceforge.net</a><br>
&gt; <a href="https://lists.sourceforge.net/lists/listinfo/openvpn-devel" rel="noreferrer noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/openvpn-devel</a><br>
<br>
<br>
<br>
-- <br>
-Lev<br>
</blockquote></div>
Илья Шипицин Dec. 31, 2021, 5:37 p.m. | #4
For the record
https://github.com/microsoft/binskim/issues/508

On Fri, Dec 31, 2021, 8:35 PM Илья Шипицин <chipitsine@gmail.com> wrote:

> CETCOMPAT is not supported for ARM.
> Regarding other arch I do not have particular opinion, I'm fine with
> either props or vcxproj approach
>
> On Fri, Dec 31, 2021, 5:09 PM Lev Stipakov <lstipakov@gmail.com> wrote:
>
>> Hi,
>>
>> Sorry for the delay.
>>
>>  1) Was it really necessary to modify .props? I enabled this via
>> Linker->Advanced->CET Shadow Stack Compatible and only .vcxproj files
>> got modified.
>>
>>  2) I think we could enable it for all binaries
>> (openvpn/openvpnmsica/openvpnserv/tapctl) for ARM64/WIn32/x64 Release
>> configurations.
>>
>> -Lev
>>
>> ma 27. jouluk. 2021 klo 11.09 Илья Шипицин (chipitsine@gmail.com)
>> kirjoitti:
>> >
>> > gentle ping
>> >
>> >
>> > сб, 16 окт. 2021 г. в 19:15, Ilya Shipitsin <chipitsine@gmail.com>:
>> >>
>> >> found by BinSkim, more details:
>> >>
>> https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160
>> >>
>> >> Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
>> >> ---
>> >>  src/compat/Debug.props                      | 10 ++++++++++
>> >>  src/compat/Release.props                    | 10 ++++++++++
>> >>  src/openvpn/openvpn.vcxproj                 |  4 ++++
>> >>  src/openvpnmsica/openvpnmsica-Debug.props   | 10 ++++++++++
>> >>  src/openvpnmsica/openvpnmsica-Release.props | 10 ++++++++++
>> >>  src/openvpnserv/openvpnserv.vcxproj         |  4 ++++
>> >>  6 files changed, 48 insertions(+)
>> >>
>> >> diff --git a/src/compat/Debug.props b/src/compat/Debug.props
>> >> index 31bb9d91..14d7a1f7 100644
>> >> --- a/src/compat/Debug.props
>> >> +++ b/src/compat/Debug.props
>> >> @@ -17,5 +17,15 @@
>> >>        <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
>> >>      </ClCompile>
>> >>    </ItemDefinitionGroup>
>> >> +  <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
>> >> +    <Link>
>> >> +      <CETCompat>true</CETCompat>
>> >> +    </Link>
>> >> +  </ItemDefinitionGroup>
>> >> +  <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
>> >> +    <Link>
>> >> +      <CETCompat>true</CETCompat>
>> >> +    </Link>
>> >> +  </ItemDefinitionGroup>
>> >>    <ItemGroup />
>> >>  </Project>
>> >> \ No newline at end of file
>> >> diff --git a/src/compat/Release.props b/src/compat/Release.props
>> >> index 50eaa8de..df04ddf2 100644
>> >> --- a/src/compat/Release.props
>> >> +++ b/src/compat/Release.props
>> >> @@ -22,5 +22,15 @@
>> >>        <OptimizeReferences>true</OptimizeReferences>
>> >>      </Link>
>> >>    </ItemDefinitionGroup>
>> >> +  <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
>> >> +    <Link>
>> >> +      <CETCompat>true</CETCompat>
>> >> +    </Link>
>> >> +  </ItemDefinitionGroup>
>> >> +  <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
>> >> +    <Link>
>> >> +      <CETCompat>true</CETCompat>
>> >> +    </Link>
>> >> +  </ItemDefinitionGroup>
>> >>    <ItemGroup />
>> >>  </Project>
>> >> \ No newline at end of file
>> >> diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
>> >> index 65ee6839..38dd22de 100644
>> >> --- a/src/openvpn/openvpn.vcxproj
>> >> +++ b/src/openvpn/openvpn.vcxproj
>> >> @@ -158,6 +158,7 @@
>> >>
>> <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>> >>
>> <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>> >>        <SubSystem>Console</SubSystem>
>> >> +      <CETCompat>true</CETCompat>
>> >>      </Link>
>> >>    </ItemDefinitionGroup>
>> >>    <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
>> >> @@ -173,6 +174,7 @@
>> >>
>> <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>> >>
>> <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>> >>        <SubSystem>Console</SubSystem>
>> >> +      <CETCompat>true</CETCompat>
>> >>      </Link>
>> >>    </ItemDefinitionGroup>
>> >>    <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
>> >> @@ -204,6 +206,7 @@
>> >>
>> <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>> >>
>> <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>> >>        <SubSystem>Console</SubSystem>
>> >> +      <CETCompat>true</CETCompat>
>> >>      </Link>
>> >>    </ItemDefinitionGroup>
>> >>    <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
>> >> @@ -220,6 +223,7 @@
>> >>
>> <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
>> >>
>> <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
>> >>        <SubSystem>Console</SubSystem>
>> >> +      <CETCompat>true</CETCompat>
>> >>      </Link>
>> >>    </ItemDefinitionGroup>
>> >>    <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
>> >> diff --git a/src/openvpnmsica/openvpnmsica-Debug.props
>> b/src/openvpnmsica/openvpnmsica-Debug.props
>> >> index 43532cfe..c99346af 100644
>> >> --- a/src/openvpnmsica/openvpnmsica-Debug.props
>> >> +++ b/src/openvpnmsica/openvpnmsica-Debug.props
>> >> @@ -10,5 +10,15 @@
>> >>        <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
>> >>      </ClCompile>
>> >>    </ItemDefinitionGroup>
>> >> +  <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
>> >> +    <Link>
>> >> +      <CETCompat>true</CETCompat>
>> >> +    </Link>
>> >> +  </ItemDefinitionGroup>
>> >> +  <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
>> >> +    <Link>
>> >> +      <CETCompat>true</CETCompat>
>> >> +    </Link>
>> >> +  </ItemDefinitionGroup>
>> >>    <ItemGroup />
>> >>  </Project>
>> >> \ No newline at end of file
>> >> diff --git a/src/openvpnmsica/openvpnmsica-Release.props
>> b/src/openvpnmsica/openvpnmsica-Release.props
>> >> index 47727b35..70f82713 100644
>> >> --- a/src/openvpnmsica/openvpnmsica-Release.props
>> >> +++ b/src/openvpnmsica/openvpnmsica-Release.props
>> >> @@ -11,5 +11,15 @@
>> >>        <ControlFlowGuard>Guard</ControlFlowGuard>
>> >>      </ClCompile>
>> >>    </ItemDefinitionGroup>
>> >> +  <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
>> >> +    <Link>
>> >> +      <CETCompat>true</CETCompat>
>> >> +    </Link>
>> >> +  </ItemDefinitionGroup>
>> >> +  <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
>> >> +    <Link>
>> >> +      <CETCompat>true</CETCompat>
>> >> +    </Link>
>> >> +  </ItemDefinitionGroup>
>> >>    <ItemGroup />
>> >>  </Project>
>> >> \ No newline at end of file
>> >> diff --git a/src/openvpnserv/openvpnserv.vcxproj
>> b/src/openvpnserv/openvpnserv.vcxproj
>> >> index 5fd7d60b..65d03e3b 100644
>> >> --- a/src/openvpnserv/openvpnserv.vcxproj
>> >> +++ b/src/openvpnserv/openvpnserv.vcxproj
>> >> @@ -130,6 +130,7 @@
>> >>      <Link>
>> >>
>> <AdditionalDependencies>Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>> >>        <SubSystem>Console</SubSystem>
>> >> +      <CETCompat>true</CETCompat>
>> >>      </Link>
>> >>    </ItemDefinitionGroup>
>> >>    <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
>> >> @@ -141,6 +142,7 @@
>> >>      <Link>
>> >>
>> <AdditionalDependencies>legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>> >>        <SubSystem>Console</SubSystem>
>> >> +      <CETCompat>true</CETCompat>
>> >>      </Link>
>> >>    </ItemDefinitionGroup>
>> >>    <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
>> >> @@ -163,6 +165,7 @@
>> >>      <Link>
>> >>
>> <AdditionalDependencies>Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>> >>        <SubSystem>Console</SubSystem>
>> >> +      <CETCompat>true</CETCompat>
>> >>      </Link>
>> >>    </ItemDefinitionGroup>
>> >>    <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
>> >> @@ -174,6 +177,7 @@
>> >>      <Link>
>> >>
>> <AdditionalDependencies>legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
>> >>        <SubSystem>Console</SubSystem>
>> >> +      <CETCompat>true</CETCompat>
>> >>      </Link>
>> >>    </ItemDefinitionGroup>
>> >>    <ItemDefinitionGroup
>> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
>> >> --
>> >> 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="auto">For the record<div dir="auto"><a href="https://github.com/microsoft/binskim/issues/508">https://github.com/microsoft/binskim/issues/508</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 31, 2021, 8:35 PM Илья Шипицин &lt;<a href="mailto:chipitsine@gmail.com">chipitsine@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">CETCOMPAT is not supported for ARM.<div dir="auto">Regarding other arch I do not have particular opinion, I&#39;m fine with either props or vcxproj approach</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 31, 2021, 5:09 PM Lev Stipakov &lt;<a href="mailto:lstipakov@gmail.com" target="_blank" rel="noreferrer">lstipakov@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Sorry for the delay.<br>
<br>
 1) Was it really necessary to modify .props? I enabled this via<br>
Linker-&gt;Advanced-&gt;CET Shadow Stack Compatible and only .vcxproj files<br>
got modified.<br>
<br>
 2) I think we could enable it for all binaries<br>
(openvpn/openvpnmsica/openvpnserv/tapctl) for ARM64/WIn32/x64 Release<br>
configurations.<br>
<br>
-Lev<br>
<br>
ma 27. jouluk. 2021 klo 11.09 Илья Шипицин (<a href="mailto:chipitsine@gmail.com" rel="noreferrer noreferrer" target="_blank">chipitsine@gmail.com</a>) kirjoitti:<br>
&gt;<br>
&gt; gentle ping<br>
&gt;<br>
&gt;<br>
&gt; сб, 16 окт. 2021 г. в 19:15, Ilya Shipitsin &lt;<a href="mailto:chipitsine@gmail.com" rel="noreferrer noreferrer" target="_blank">chipitsine@gmail.com</a>&gt;:<br>
&gt;&gt;<br>
&gt;&gt; found by BinSkim, more details:<br>
&gt;&gt; <a href="https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160" rel="noreferrer noreferrer noreferrer" target="_blank">https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-160</a><br>
&gt;&gt;<br>
&gt;&gt; Signed-off-by: Ilya Shipitsin &lt;<a href="mailto:chipitsine@gmail.com" rel="noreferrer noreferrer" target="_blank">chipitsine@gmail.com</a>&gt;<br>
&gt;&gt; ---<br>
&gt;&gt;  src/compat/Debug.props                      | 10 ++++++++++<br>
&gt;&gt;  src/compat/Release.props                    | 10 ++++++++++<br>
&gt;&gt;  src/openvpn/openvpn.vcxproj                 |  4 ++++<br>
&gt;&gt;  src/openvpnmsica/openvpnmsica-Debug.props   | 10 ++++++++++<br>
&gt;&gt;  src/openvpnmsica/openvpnmsica-Release.props | 10 ++++++++++<br>
&gt;&gt;  src/openvpnserv/openvpnserv.vcxproj         |  4 ++++<br>
&gt;&gt;  6 files changed, 48 insertions(+)<br>
&gt;&gt;<br>
&gt;&gt; diff --git a/src/compat/Debug.props b/src/compat/Debug.props<br>
&gt;&gt; index 31bb9d91..14d7a1f7 100644<br>
&gt;&gt; --- a/src/compat/Debug.props<br>
&gt;&gt; +++ b/src/compat/Debug.props<br>
&gt;&gt; @@ -17,5 +17,15 @@<br>
&gt;&gt;        &lt;DebugInformationFormat&gt;EditAndContinue&lt;/DebugInformationFormat&gt;<br>
&gt;&gt;      &lt;/ClCompile&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemGroup /&gt;<br>
&gt;&gt;  &lt;/Project&gt;<br>
&gt;&gt; \ No newline at end of file<br>
&gt;&gt; diff --git a/src/compat/Release.props b/src/compat/Release.props<br>
&gt;&gt; index 50eaa8de..df04ddf2 100644<br>
&gt;&gt; --- a/src/compat/Release.props<br>
&gt;&gt; +++ b/src/compat/Release.props<br>
&gt;&gt; @@ -22,5 +22,15 @@<br>
&gt;&gt;        &lt;OptimizeReferences&gt;true&lt;/OptimizeReferences&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|Win32&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemGroup /&gt;<br>
&gt;&gt;  &lt;/Project&gt;<br>
&gt;&gt; \ No newline at end of file<br>
&gt;&gt; diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj<br>
&gt;&gt; index 65ee6839..38dd22de 100644<br>
&gt;&gt; --- a/src/openvpn/openvpn.vcxproj<br>
&gt;&gt; +++ b/src/openvpn/openvpn.vcxproj<br>
&gt;&gt; @@ -158,6 +158,7 @@<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
&gt;&gt; @@ -173,6 +174,7 @@<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|ARM64&#39;&quot;&gt;<br>
&gt;&gt; @@ -204,6 +206,7 @@<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
&gt;&gt; @@ -220,6 +223,7 @@<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;AdditionalLibraryDirectories&gt;$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)&lt;/AdditionalLibraryDirectories&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot;&gt;<br>
&gt;&gt; diff --git a/src/openvpnmsica/openvpnmsica-Debug.props b/src/openvpnmsica/openvpnmsica-Debug.props<br>
&gt;&gt; index 43532cfe..c99346af 100644<br>
&gt;&gt; --- a/src/openvpnmsica/openvpnmsica-Debug.props<br>
&gt;&gt; +++ b/src/openvpnmsica/openvpnmsica-Debug.props<br>
&gt;&gt; @@ -10,5 +10,15 @@<br>
&gt;&gt;        &lt;RuntimeLibrary&gt;MultiThreadedDebug&lt;/RuntimeLibrary&gt;<br>
&gt;&gt;      &lt;/ClCompile&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|Win32&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemGroup /&gt;<br>
&gt;&gt;  &lt;/Project&gt;<br>
&gt;&gt; \ No newline at end of file<br>
&gt;&gt; diff --git a/src/openvpnmsica/openvpnmsica-Release.props b/src/openvpnmsica/openvpnmsica-Release.props<br>
&gt;&gt; index 47727b35..70f82713 100644<br>
&gt;&gt; --- a/src/openvpnmsica/openvpnmsica-Release.props<br>
&gt;&gt; +++ b/src/openvpnmsica/openvpnmsica-Release.props<br>
&gt;&gt; @@ -11,5 +11,15 @@<br>
&gt;&gt;        &lt;ControlFlowGuard&gt;Guard&lt;/ControlFlowGuard&gt;<br>
&gt;&gt;      &lt;/ClCompile&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|Win32&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt; +  &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
&gt;&gt; +    &lt;Link&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt; +    &lt;/Link&gt;<br>
&gt;&gt; +  &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemGroup /&gt;<br>
&gt;&gt;  &lt;/Project&gt;<br>
&gt;&gt; \ No newline at end of file<br>
&gt;&gt; diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj<br>
&gt;&gt; index 5fd7d60b..65d03e3b 100644<br>
&gt;&gt; --- a/src/openvpnserv/openvpnserv.vcxproj<br>
&gt;&gt; +++ b/src/openvpnserv/openvpnserv.vcxproj<br>
&gt;&gt; @@ -130,6 +130,7 @@<br>
&gt;&gt;      &lt;Link&gt;<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|x64&#39;&quot;&gt;<br>
&gt;&gt; @@ -141,6 +142,7 @@<br>
&gt;&gt;      &lt;Link&gt;<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Debug|ARM64&#39;&quot;&gt;<br>
&gt;&gt; @@ -163,6 +165,7 @@<br>
&gt;&gt;      &lt;Link&gt;<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|x64&#39;&quot;&gt;<br>
&gt;&gt; @@ -174,6 +177,7 @@<br>
&gt;&gt;      &lt;Link&gt;<br>
&gt;&gt;        &lt;AdditionalDependencies&gt;legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)&lt;/AdditionalDependencies&gt;<br>
&gt;&gt;        &lt;SubSystem&gt;Console&lt;/SubSystem&gt;<br>
&gt;&gt; +      &lt;CETCompat&gt;true&lt;/CETCompat&gt;<br>
&gt;&gt;      &lt;/Link&gt;<br>
&gt;&gt;    &lt;/ItemDefinitionGroup&gt;<br>
&gt;&gt;    &lt;ItemDefinitionGroup Condition=&quot;&#39;$(Configuration)|$(Platform)&#39;==&#39;Release|ARM64&#39;&quot;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; 2.29.2.windows.2<br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; Openvpn-devel mailing list<br>
&gt; <a href="mailto:Openvpn-devel@lists.sourceforge.net" rel="noreferrer noreferrer" target="_blank">Openvpn-devel@lists.sourceforge.net</a><br>
&gt; <a href="https://lists.sourceforge.net/lists/listinfo/openvpn-devel" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/openvpn-devel</a><br>
<br>
<br>
<br>
-- <br>
-Lev<br>
</blockquote></div>
</blockquote></div>

Patch

diff --git a/src/compat/Debug.props b/src/compat/Debug.props
index 31bb9d91..14d7a1f7 100644
--- a/src/compat/Debug.props
+++ b/src/compat/Debug.props
@@ -17,5 +17,15 @@ 
       <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
     </ClCompile>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Link>
+      <CETCompat>true</CETCompat>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Link>
+      <CETCompat>true</CETCompat>
+    </Link>
+  </ItemDefinitionGroup>
   <ItemGroup />
 </Project>
\ No newline at end of file
diff --git a/src/compat/Release.props b/src/compat/Release.props
index 50eaa8de..df04ddf2 100644
--- a/src/compat/Release.props
+++ b/src/compat/Release.props
@@ -22,5 +22,15 @@ 
       <OptimizeReferences>true</OptimizeReferences>
     </Link>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Link>
+      <CETCompat>true</CETCompat>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Link>
+      <CETCompat>true</CETCompat>
+    </Link>
+  </ItemDefinitionGroup>
   <ItemGroup />
 </Project>
\ No newline at end of file
diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
index 65ee6839..38dd22de 100644
--- a/src/openvpn/openvpn.vcxproj
+++ b/src/openvpn/openvpn.vcxproj
@@ -158,6 +158,7 @@ 
       <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <SubSystem>Console</SubSystem>
+      <CETCompat>true</CETCompat>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -173,6 +174,7 @@ 
       <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <SubSystem>Console</SubSystem>
+      <CETCompat>true</CETCompat>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
@@ -204,6 +206,7 @@ 
       <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <SubSystem>Console</SubSystem>
+      <CETCompat>true</CETCompat>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -220,6 +223,7 @@ 
       <AdditionalDependencies>Ncrypt.lib;gdi32.lib;ws2_32.lib;wininet.lib;crypt32.lib;iphlpapi.lib;winmm.lib;Fwpuclnt.lib;Rpcrt4.lib;setupapi.lib;Advapi32.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(OPENSSL_HOME)/lib;$(LZO_HOME)/lib;$(PKCS11H_HOME)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <SubSystem>Console</SubSystem>
+      <CETCompat>true</CETCompat>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
diff --git a/src/openvpnmsica/openvpnmsica-Debug.props b/src/openvpnmsica/openvpnmsica-Debug.props
index 43532cfe..c99346af 100644
--- a/src/openvpnmsica/openvpnmsica-Debug.props
+++ b/src/openvpnmsica/openvpnmsica-Debug.props
@@ -10,5 +10,15 @@ 
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     </ClCompile>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Link>
+      <CETCompat>true</CETCompat>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Link>
+      <CETCompat>true</CETCompat>
+    </Link>
+  </ItemDefinitionGroup>
   <ItemGroup />
 </Project>
\ No newline at end of file
diff --git a/src/openvpnmsica/openvpnmsica-Release.props b/src/openvpnmsica/openvpnmsica-Release.props
index 47727b35..70f82713 100644
--- a/src/openvpnmsica/openvpnmsica-Release.props
+++ b/src/openvpnmsica/openvpnmsica-Release.props
@@ -11,5 +11,15 @@ 
       <ControlFlowGuard>Guard</ControlFlowGuard>
     </ClCompile>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Link>
+      <CETCompat>true</CETCompat>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Link>
+      <CETCompat>true</CETCompat>
+    </Link>
+  </ItemDefinitionGroup>
   <ItemGroup />
 </Project>
\ No newline at end of file
diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj
index 5fd7d60b..65d03e3b 100644
--- a/src/openvpnserv/openvpnserv.vcxproj
+++ b/src/openvpnserv/openvpnserv.vcxproj
@@ -130,6 +130,7 @@ 
     <Link>
       <AdditionalDependencies>Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <SubSystem>Console</SubSystem>
+      <CETCompat>true</CETCompat>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -141,6 +142,7 @@ 
     <Link>
       <AdditionalDependencies>legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <SubSystem>Console</SubSystem>
+      <CETCompat>true</CETCompat>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
@@ -163,6 +165,7 @@ 
     <Link>
       <AdditionalDependencies>Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <SubSystem>Console</SubSystem>
+      <CETCompat>true</CETCompat>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -174,6 +177,7 @@ 
     <Link>
       <AdditionalDependencies>legacy_stdio_definitions.lib;Userenv.lib;Iphlpapi.lib;ntdll.lib;Fwpuclnt.lib;Netapi32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <SubSystem>Console</SubSystem>
+      <CETCompat>true</CETCompat>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">