diff options
author | Ava Chow <github@achow101.com> | 2024-08-05 17:52:42 -0400 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-08-05 17:52:42 -0400 |
commit | 949b67347255c0f2494055cbcdbb729a6476ded7 (patch) | |
tree | 8acdee03ec37e932eec08a29b70c89424281a413 /contrib | |
parent | 44a4a0151c9de33d8175b003fca21059d8abc1da (diff) | |
parent | fa895c72832f9555b52d5bb1dba1093f73de3136 (diff) |
Merge bitcoin/bitcoin#28052: blockstorage: XOR blocksdir *.dat files
fa895c72832f9555b52d5bb1dba1093f73de3136 mingw: Document mode wbx workaround (MarcoFalke)
fa359255fe6b4de5f26784bfc147dbfb58bef116 Add -blocksxor boolean option (MarcoFalke)
fa7f7ac040a9467c307b20e77dc47c87d7377ded Return XOR AutoFile from BlockManager::Open*File() (MarcoFalke)
Pull request description:
Currently the *.dat files in the blocksdir store the data received from remote peers as-is. This may be problematic when a program other than Bitcoin Core tries to interpret them by accident. For example, an anti-virus program or other program may scan them and move them into quarantine, or delete them, or corrupt them. This may cause Bitcoin Core to fail a reorg, or fail to reply to block requests (via P2P, RPC, REST, ...).
Fix this, similar to https://github.com/bitcoin/bitcoin/pull/6650, by rolling a random XOR pattern over the dat files when writing or reading them.
Obviously this can only protect against programs that accidentally and unintentionally are trying to mess with the dat files. Any program that intentionally wants to mess with the dat files can still trivially do so.
The XOR pattern is only applied when the blocksdir is freshly created, and there is an option to disable it (on creation), so that people can disable it, if needed.
ACKs for top commit:
achow101:
ACK fa895c72832f9555b52d5bb1dba1093f73de3136
TheCharlatan:
Re-ACK fa895c72832f9555b52d5bb1dba1093f73de3136
hodlinator:
ACK fa895c72832f9555b52d5bb1dba1093f73de3136
Tree-SHA512: c92a6a717da83bc33a9b8671a779eeefde2c63b192362ba1d71e6535ee31d08e2802b74acc908345197de9daac6930e4771595ee25b09acd5a67f7ea34854720
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions