git-annex/Annex
Joey Hess bd5affa362
use hmac in balanced preferred content
This deals with the possible security problem that someone could make an
unusually low UUID and generate keys that are all constructed to hash to
a number that, mod the number of repositories in the group, == 0.
So balanced preferred content would always put those keys in the
repository with the low UUID as long as the group contains the
number of repositories that the attacker anticipated.
Presumably the attacker than holds the data for ransom? Dunno.

Anyway, the partial solution is to use HMAC (sha256) with all the UUIDs
combined together as the "secret", and the key as the "message". Now any
change in the set of UUIDs in a group will invalidate the attacker's
constructed keys from hashing to anything in particular.

Given that there are plenty of other things someone can do if they can
write to the repository -- including modifying preferred content so only
their repository wants files, and numcopies so other repositories drom
them -- this seems like safeguard enough.

Note that, in balancedPicker, combineduuids is memoized.
2024-08-10 16:32:54 -04:00
..
AdjustedBranch
Branch
Concurrent
Content
Debug
LockPool
MetaData
SpecialRemote proxied exporttree=yes versionedexport=yes remotes are not untrusted 2024-08-08 15:24:19 -04:00
VectorClock
View
Action.hs
AdjustedBranch.hs
AutoMerge.hs
Balanced.hs use hmac in balanced preferred content 2024-08-10 16:32:54 -04:00
BloomFilter.hs
Branch.hs smarter BranchState cache invalidation 2024-07-28 12:33:32 -04:00
BranchState.hs smarter BranchState cache invalidation 2024-07-28 12:33:32 -04:00
CatFile.hs
ChangedRefs.hs
CheckAttr.hs
CheckIgnore.hs
Cluster.hs clusters need enableInteractiveBranchAccess 2024-07-28 12:39:42 -04:00
Common.hs
Concurrent.hs
Content.hs final fix to windows build 2024-07-29 16:32:24 -04:00
CopyFile.hs
CurrentBranch.hs
Debug.hs
Difference.hs
DirHashes.hs
Drop.hs don't count clusters as copies, continued 2024-06-16 15:14:53 -04:00
Environment.hs
Export.hs
ExternalAddonProcess.hs
FileMatcher.hs balanced preferred content and --rebalance 2024-08-09 14:16:09 -04:00
Fixup.hs
GitOverlay.hs
HashObject.hs
Hook.hs
Import.hs proxied exporttree=yes versionedexport=yes remotes are not untrusted 2024-08-08 15:24:19 -04:00
Ingest.hs
Init.hs
InodeSentinal.hs
Journal.hs share single BranchState amoung all threads 2024-07-28 12:30:27 -04:00
Link.hs
Locations.hs rename to annexobjects location on unexport 2024-08-04 11:58:07 -04:00
LockFile.hs
LockPool.hs
Magic.hs
MetaData.hs
Multicast.hs
Notification.hs
NumCopies.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Path.hs Propagate --force to git-annex transferrer 2024-07-23 21:16:56 -04:00
Perms.hs
PidLock.hs
Proxy.hs proxy stores received keys to known export locations 2024-08-07 09:47:34 -04:00
Queue.hs
RemoteTrackingBranch.hs
ReplaceFile.hs
SafeDropProof.hs use REMOVE-BEFORE in P2P protocol 2024-07-04 13:47:38 -04:00
SpecialRemote.hs
Ssh.hs
StallDetection.hs
Startup.hs Avoid loading cluster log at startup 2024-07-31 15:54:14 -04:00
TaggedPush.hs
Tmp.hs
Transfer.hs add optional object file location to storeKey 2024-07-01 10:42:27 -04:00
TransferrerPool.hs
UntrustedFilePath.hs
UpdateInstead.hs
Url.hs
UUID.hs
VariantFile.hs
VectorClock.hs
Verify.hs When proxying an upload to a special remote, verify the hash. 2024-07-29 13:40:51 -04:00
Version.hs
View.hs
Wanted.hs
WorkerPool.hs add Annex worker pool to P2PHttp 2024-07-10 12:19:47 -04:00
WorkTree.hs
YoutubeDl.hs