Skip to content

Commit 583e314

Browse files
committed
Merge 298fd02 into merged_master (Bitcoin PR bitcoin/bitcoin#21045)
2 parents 4485d3c + 298fd02 commit 583e314

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

build_msvc/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,25 @@ For safety reasons the Bitcoin Core .appveyor.yml file has the artifact options
8181
#- 7z a bitcoin-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\build_msvc\%platform%\%configuration%\*.exe
8282
#- path: bitcoin-%APPVEYOR_BUILD_VERSION%.zip
8383
```
84+
85+
Security
86+
---------------------
87+
[Base address randomization](https://docs.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization?view=msvc-160) is used to make Bitcoin Core more secure. When building Bitcoin using the `build_msvc` process base address randomization can be disabled by editing `common.init.vcproj` to change `RandomizedBaseAddress` from `true` to `false` and then rebuilding the project.
88+
89+
To check if `bitcoind` has `RandomizedBaseAddress` enabled or disabled run
90+
91+
```
92+
.\dumpbin.exe /headers src/bitcoind.exe
93+
```
94+
95+
If is it enabled then in the output `Dynamic base` will be listed in the `DLL characteristics` under `OPTIONAL HEADER VALUES` as shown below
96+
97+
```
98+
8160 DLL characteristics
99+
High Entropy Virtual Addresses
100+
Dynamic base
101+
NX compatible
102+
Terminal Server Aware
103+
```
104+
105+
This may not disable all stack randomization as versions of windows employ additional stack randomization protections. These protections must be turned off in the OS configuration.

build_msvc/common.init.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
<Link>
106106
<SubSystem>Console</SubSystem>
107107
<AdditionalDependencies>Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
108+
<RandomizedBaseAddress>true</RandomizedBaseAddress>
108109
</Link>
109110
<Lib>
110111
<AdditionalOptions>/ignore:4221</AdditionalOptions>

0 commit comments

Comments
 (0)