473e1718cc
ptr = sodium_malloc(size) returns a pointer from which exactly "size" bytes can be accessed. ptr = sodium_allocarray(count, size) allocates enough storage space for "count" pointers or scalars of unit size "size". In both cases, the region is immediately followed by a guard page. As a result, any attempt to access a memory location after ptr[size - 1] will immediately trigger a segmentation fault. The allocated region is mlock()ed and filled with 0xd0 bytes. A read-only page with the size, a guard page, as well as a canary are placed before the returned pointer. The canary is checked by sodium_free(); as a result, altering data right before ptr is likely to cause sodium_free() to kill the process. sodium_free() munlock()s the region and fills it with zeros before actually calling free(). sodium_mprotect_noaccess(), sodium_mprotect_readonly() and sodium_mprotect_readwrite() can be used to change the protection on the set of allocated pages. Reverting the protection to read+write is not required before calling sodium_free().
224 lines
9.3 KiB
XML
224 lines
9.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<PropertyGroup Label="Globals">
|
|
<ProjectGuid>{4EDBA07C-2F08-4C9E-805F-A4921814C117}</ProjectGuid>
|
|
<ProjectName>test</ProjectName>
|
|
<PlatformToolset>v120</PlatformToolset>
|
|
<ConfigurationType>Application</ConfigurationType>
|
|
</PropertyGroup>
|
|
<ItemGroup Label="ProjectConfigurations">
|
|
<ProjectConfiguration Include="DebugDEXE|Win32">
|
|
<Configuration>DebugDEXE</Configuration>
|
|
<Platform>Win32</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="ReleaseDEXE|Win32">
|
|
<Configuration>ReleaseDEXE</Configuration>
|
|
<Platform>Win32</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="DebugDEXE|x64">
|
|
<Configuration>DebugDEXE</Configuration>
|
|
<Platform>x64</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="ReleaseDEXE|x64">
|
|
<Configuration>ReleaseDEXE</Configuration>
|
|
<Platform>x64</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="DebugLEXE|Win32">
|
|
<Configuration>DebugLEXE</Configuration>
|
|
<Platform>Win32</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="ReleaseLEXE|Win32">
|
|
<Configuration>ReleaseLEXE</Configuration>
|
|
<Platform>Win32</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="DebugLEXE|x64">
|
|
<Configuration>DebugLEXE</Configuration>
|
|
<Platform>x64</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="ReleaseLEXE|x64">
|
|
<Configuration>ReleaseLEXE</Configuration>
|
|
<Platform>x64</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="DebugSEXE|Win32">
|
|
<Configuration>DebugSEXE</Configuration>
|
|
<Platform>Win32</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="ReleaseSEXE|Win32">
|
|
<Configuration>ReleaseSEXE</Configuration>
|
|
<Platform>Win32</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="DebugSEXE|x64">
|
|
<Configuration>DebugSEXE</Configuration>
|
|
<Platform>x64</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="ReleaseSEXE|x64">
|
|
<Configuration>ReleaseSEXE</Configuration>
|
|
<Platform>x64</Platform>
|
|
</ProjectConfiguration>
|
|
</ItemGroup>
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
<ImportGroup Label="PropertySheets">
|
|
<Import Project="$(ProjectDir)..\..\properties\$(Configuration).props" />
|
|
<Import Project="$(ProjectDir)..\..\properties\Output.props" />
|
|
<Import Project="$(ProjectDir)$(ProjectName).props" />
|
|
</ImportGroup>
|
|
<ItemGroup>
|
|
<ClCompile Include="..\..\..\..\test\default\auth.c">
|
|
<ExcludedFromBuild>false</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\auth2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\auth3.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\auth5.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\box.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\box2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\box7.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\box8.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\box_easy.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\box_easy2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\core1.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\core2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\core3.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\core4.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\core5.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\core6.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\ed25519_convert.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\generichash.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\generichash2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\generichash3.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\hash.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\hash3.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\onetimeauth.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\onetimeauth2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\onetimeauth7.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\pwhash.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\randombytes.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\scalarmult.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\scalarmult2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\scalarmult5.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\scalarmult6.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\secretbox.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\secretbox2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\secretbox7.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\secretbox8.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\secretbox_easy.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\secretbox_easy2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\shorthash.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\sign.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\sodium_core.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\sodium_utils.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\sodium_utils2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\sodium_utils3.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\sodium_version.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\stream.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\stream2.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\stream3.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\stream4.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\stream5.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
<ClCompile Include="..\..\..\..\test\default\stream6.c">
|
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
|
</ClCompile>
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<ClInclude Include="..\..\..\..\test\default\cmptest.h" />
|
|
<ClInclude Include="..\..\..\..\test\quirks\windows\windows-quirks.h" />
|
|
</ItemGroup>
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
</Project>
|