Public Security Advisories
Coordinated vulnerability disclosures from Argus. Findings, impact, and remediation, published in good faith.
On Microchip PIC32 builds without the PIC32MZ hardware RNG, wolfSSL's seed function seeds the C library generator from the CPU core timer and returns rand() output as the DRBG seed. The core timer counts cycles since reset and is not secret, so the seed, and everything drawn from the DRBG, can be recomputed by search.
On EBSnet RTP builds, wolfSSL's seed function seeds the platform generator once from the system millisecond clock and returns rtp_rand() output as the DRBG seed. The whole seed is a function of one clock reading, so it, and everything drawn from the DRBG, can be recomputed by searching a window of milliseconds.
On INtime RTOS v5 and older, wolfSSL's seed function calls srand(time(0)) and returns rand() output as the DRBG seed. The only input is the calendar time in whole seconds, so the seed, and everything drawn from the DRBG, can be recomputed by trying the seconds around an observed session.
On Apache Mynewt builds, wolfSSL's seed function seeds the C library generator from the OS tick counter and returns rand() output as the DRBG seed. The tick counter is the time since boot and is not secret, so the seed, and everything drawn from the DRBG, can be recomputed by searching candidate uptimes.
On DDC-I Deos builds, wolfSSL's seed function seeds rand_r() from the system clock and returns its output as the DRBG seed. The clock value can be estimated and rand_r() is deterministic, so the seed, and everything drawn from the DRBG, can be recomputed by searching candidate clock values.
On Nucleus RTOS builds, wolfSSL's seed function seeds the C library generator from NU_Get_Time_Stamp() and returns rand() output as the DRBG seed. The time stamp is a system counter with no secret in it, so the seed, and everything drawn from the DRBG, can be recomputed by searching candidate counter values.
On Telit M2MB builds, wolfSSL's seed function seeds the C library generator from the millisecond field of the module's real-time clock and returns rand() output as the DRBG seed. Each clock read has at most 1000 possible values, so the seed, and everything drawn from the DRBG, can be recomputed by search.
On TI-RTOS builds, wolfSSL's seed function seeds the C library generator from the 32-bit XDC runtime timestamp and returns rand() output as the DRBG seed. The seed is a function of a few counter readings, so an observer who can bound them can recompute the DRBG state and every value drawn from it.
On VxWorks 6.x builds, wolfSSL's seed function takes the current time in seconds as the rand_r() state and returns rand_r() output as the DRBG seed. An observer who can bound the device clock at initialisation can recompute the DRBG state and every value drawn from it.
On builds that define DOLPHIN_EMULATOR or WOLFSSL_NDS, wc_GenerateSeed() calls srand(time(NULL)) and fills the DRBG seed from rand(). The seed is a function of the clock in whole seconds, so an observer who can bound that clock can recompute the DRBG state and every value drawn from it.
The settings file shipped with wolfSSL's NXP StarCore project selects my_rng_generate_seed() as the DRBG seed source. That function seeds rand() with the clock in seconds and returns rand() output, so an observer who can bound the device clock can recompute the DRBG state and every value drawn from it.
On Zephyr configurations without an entropy driver and a zephyr,entropy chosen node, wc_GenerateSeed() fills the DRBG seed from sys_rand_get(), a general-purpose generator, and returns success. On boards where that generator is deterministic, an observer who can model it can recompute the DRBG state.
In builds for the Dolphin emulator and the Nintendo DS, wolfSSL's seed function calls srand(time(NULL)) and returns rand() output as the DRBG seed. The seed, and every random value derived from it, is a function of the wall-clock second at which the generator was initialised. These two targets are not selected by any default build.
wolfSSL contains a test seed function that returns the bytes 0, 1, 2 and so on. It is selected by WOLFSSL_GENSEED_FORTEST and also, with only a compiler warning, by a group of platform macros that have no entropy source of their own. A build that ships with it starts every random number generator from the same state. Default builds are not affected.
// No embargoed advisories.