Tag Archives: CVE-2019-11495

CWE-337 – Predictable Seed in Pseudo-Random Number Generator (PRNG)

Read Time:1 Minute, 11 Second

Description

A Pseudo-Random Number Generator (PRNG) is initialized from a predictable seed, such as the process ID or system time.

The use of predictable seeds significantly reduces the number of possible seeds that an attacker would need to test in order to predict which random numbers will be generated by the PRNG.

Modes of Introduction:

– Architecture and Design

 

 

Related Weaknesses

CWE-335

 

Consequences

Other: Varies by Context

 

Potential Mitigations

Phase:

Description: 

Use non-predictable inputs for seed generation.

Phase: Architecture and Design, Requirements

Description: 

Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems, or use the more recent FIPS 140-3 [REF-1192] if possible.

Phase: Implementation

Description: 

Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.

CVE References

  • CVE-2019-11495
    • server uses erlang:now() to seed the PRNG, which
      results in a small search space for potential random
      seeds
  • CVE-2008-0166
    • The removal of a couple lines of code caused Debian’s OpenSSL Package to only use the current process ID for seeding a PRNG
  • CVE-2016-10180
    • Router’s PIN generation is based on rand(time(0)) seeding.
  • CVE-2018-9057
    • cloud provider product uses a non-cryptographically secure PRNG and seeds it with the current time

CWE-335 – Incorrect Usage of Seeds in Pseudo-Random Number Generator (PRNG)

Read Time:44 Second

Description

The software uses a Pseudo-Random Number Generator (PRNG) but does not correctly manage seeds.

Modes of Introduction:

– Architecture and Design

 

 

Related Weaknesses

CWE-330
CWE-330

 

Consequences

Access Control, Other: Bypass Protection Mechanism, Other

If a PRNG is used incorrectly, such as using the same seed for each initialization or using a predictable seed, then an attacker may be able to easily guess the seed and thus the random numbers. This could lead to unauthorized access to a system if the seed is used for authentication and authorization.

 

Potential Mitigations

CVE References

  • CVE-2019-11495
    • server uses erlang:now() to seed the PRNG, which
      results in a small search space for potential random
      seeds
  • CVE-2018-12520
    • Product’s PRNG is not seeded for the generation of session IDs
  • CVE-2016-10180
    • Router’s PIN generation is based on rand(time(0)) seeding.