Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update parasoft

...

The use of the rand() function can result in predictable random numbers.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

MSC30-C

Medium

Unlikely

Low

P6

L2

Automated Detection

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
 

Supported, but no explicit checker
Clang
Include Page
Clang_40_V
Clang_40_V
cert-msc30-cChecked by clang-tidy
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V
BADFUNC.RANDOM.RANDUse of rand
Compass/ROSE

 

 

 




Coverity
Include Page
Coverity_V
Coverity_V

DONTCALL

Implemented - weak support

ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

CC2.MSC30

Fully implemented

LDRA tool suite
Include Page
LDRA_V
LDRA_V
44 SEnhanced enforcement
Parasoft C/C++test
Include Page
c:
Parasoft_V
c:
Parasoft_V
SECURITY-02_bFully implemented
Polyspace Bug FinderR2016aVulnerable pseudo-random number generator

Using a cryptographically weak pseudo-random number generator

PRQA QA-C
Include Page
PRQA QA-C_v
PRQA QA-C_v
5022Fully implemented

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

...

Key here (explains table format and definitions)

Taxonomy

Taxonomy item

Relationship

CERT CMSC50-CPP. Do not use std::rand() for generating pseudorandom numbersPrior to 2018-01-12: CERT: Unspecified Relationship
CERT Oracle Secure Coding Standard for JavaMSC02-J. Generate strong random numbersPrior to 2018-01-12: CERT: Unspecified Relationship
CWE 2.11CWE-327, Use of a Broken or Risky Cryptographic Algorithm2017-05-16: CERT: Rule subset of CWE
CWE 2.11CWE-330, Use of Insufficiently Random Values2017-06-28: CERT: Rule subset of CWE
CWE 2.11CWE-338, Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)2017-06-28: CERT: Rule subset of CWE
CWE 2.11CWE-6762017-05-18: CERT: Rule subset of CWE

CERT-CWE Mapping Notes

Key here for mapping notes

...

  • Invocation of other dangerous functions, besides rand().


Bibliography

...


...