mbox series

[BlueZ,0/5] Replace random number generation function

Message ID 20211208005446.196637-1-hj.tedd.an@gmail.com (mailing list archive)
Headers show
Series Replace random number generation function | expand

Message

Tedd Ho-Jeong An Dec. 8, 2021, 12:54 a.m. UTC
From: Tedd Ho-Jeong An <tedd.an@intel.com>

This series of patch replaces the standard random number generation
function, rand() to the l_getrandom() from the ELL, which is based on
getrandom() system call.

The Coverity scan reported (CWE-676):
  rand() should not be used for security-related applications, because
  linear congruential algorithms are too easy to break.

This patches replaces the rand() to l_getrandom() from ELL. It is based
on the getrandom() syscall, which provides more secure random number
than the standard rand().

Tedd Ho-Jeong An (5):
  emulator: Replace random number generation function
  peripheral: Replace random number generation function
  tools/btgatt-server: Replace random number generation function
  plugins: Replace random number generation function
  profiles/health: Replace random number generation function

 Makefile.plugins      |  2 ++
 Makefile.tools        | 10 ++++++----
 emulator/le.c         |  4 ++--
 emulator/phy.c        |  6 ++++--
 peripheral/main.c     |  8 +++-----
 plugins/autopair.c    |  3 ++-
 profiles/health/hdp.c |  8 ++++----
 tools/btgatt-server.c |  3 ++-
 8 files changed, 25 insertions(+), 19 deletions(-)