You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pre-existing: rand() in cf-agent is effectively seeded with time(NULL) only #33
Found by the Fable review of #27, verified by running.
RandomSeed() (libpromises/crypto.c) runs from CryptoInitialize() inside GenericAgentInitialize(). That happens before SetReferenceTime() sets CFSTARTTIME and before VFQNAME is known, so the intended pid/start-time/fqdn mixing collapses to the current second. Any rand()-derived name is predictable.
--simulate-json no longer relies on it; it now uses RAND_bytes(). libpromises/override_fsattrs.c uses the same <file>.<rand>.cfnew idiom and inherits the weakness, although it unlinks first. To do: reseed after SetReferenceTime(), or move override_fsattrs.c to RAND_bytes().
Activity