Mailing List Archive

[Bug 2591] New: Can't load /root/.rnd into RNG
https://bugs.exim.org/show_bug.cgi?id=2591

Bug ID: 2591
Summary: Can't load /root/.rnd into RNG
Product: Exim
Version: 4.93
Hardware: x86-64
OS: Linux
Status: NEW
Severity: security
Priority: medium
Component: TLS
Assignee: jgh146exb@wizmail.org
Reporter: g2pc@visionduweb.com
CC: exim-dev@exim.org

Générer un certificat :
sudo bash /usr/share/doc/exim4-base/examples/exim-gencert
[*] Creating a self signed SSL certificate for Exim!
This may be sufficient to establish encrypted connections but for
secure identification you need to buy a real certificate!

Please enter the hostname of your MTA at the Common Name (CN) prompt!

Can't load /root/.rnd into RNG
139960444302464:error:2406F079:random number generator:RAND_load_file:Cannot
open file:../crypto/rand/randfile.c:98:Filename=/root/.rnd

Pour ne plus rencontrer l'erreur "Can't load /root/.rnd into RNG", éditer le
script proposé par Exim pour générer le certificat :
sudo nano /usr/share/doc/exim4-base/examples/exim-gencert
Commenter la ligne suivante pourrait être suffisant ?
RANDFILE = $HOME/.rnd

Malgré cette erreur rencontrée avec le script de génération de certificat
proposé par Exim, une clé privée RSA de 2048 bits sera bien générée.
Le fichier /root/.rnd n'a pas besoin d'exister initialement car le fichier
/usr/share/doc/exim4-base/examples/exim-gencert va le créer puisqu'il n'existe
pas.
Le fichier /root/.rnd existera effectivement par après :
-rw------- 1 root root 1024 juin 6 18:41 .rnd
Il faudrait remonter ce manque de clarté au projet Exim, pour que le message
d'erreur soit moins ambigu : non, le fichier n'existe pas, mais, oui, il va
être créé.

Le système d'exploitation fournit automatiquement ce fichier de hash en
utilisant son propre RNG via /dev/urandom ou via des appels système tels que
getentropy() ou CryptGenRandom().
Le fichier .rnd est un résidu du temps où le système d'exploitation manquait
d'un bon CSPRNG, peut-être lorsque le Linux /dev/urandom était considéré comme
de mauvaise qualité et que /dev/random produisait des données trop lentement en
raison de problématiques d'entropie. Ce n'est plus le cas à ce jour.
S'appuyer entièrement sur un fichier de hash stocké dans votre homedir serait
en fait moins sûr.

##################################

Generate a certificate:
sudo bash / usr / share / doc / exim4-base / examples / exim-gencert
[*] Creating a self signed SSL certificate for Exim!
This may be sufficient to establish encrypted connections but for
secure identification you need to buy a real certificate!

Please enter the hostname of your MTA at the Common Name (CN) prompt!

Can't load /root/.rnd into RNG
139960444302464: error: 2406F079: random number generator: RAND_load_file:
Cannot open file: ../ crypto / rand / randfile.c: 98: Filename = / root / .rnd

To avoid encountering the error "Can't load /root/.rnd into RNG", edit the
script proposed by Exim to generate the certificate:
sudo nano / usr / share / doc / exim4-base / examples / exim-gencert
Commenting on the next line might be enough?
RANDFILE = $ HOME / .rnd

Despite this error encountered with the certificate generation script proposed
by Exim, a 2048-bit RSA private key will be generated.
The file /root/.rnd does not need to exist initially because the file / usr /
share / doc / exim4-base / examples / exim-gencert will create it since it does
not exist.
The file /root/.rnd will actually exist afterwards:
-rw ------- 1 root root 1024 June 6 18:41 .rnd
This lack of clarity should be traced back to the Exim project, so that the
error message is less ambiguous: no, the file does not exist, but, yes, it will
be created.

The operating system automatically provides this hash file using its own RNG
via / dev / urandom or via system calls such as getentropy () or CryptGenRandom
().
The .rnd file is a residue of the time when the operating system lacked a good
CSPRNG, perhaps when the Linux / dev / urandom was considered to be of poor
quality and / dev / random produced data too slowly in because of entropy
issues. This is no longer the case today.
Relying entirely on a hash file stored in your homedir would actually be less
secure.

--
You are receiving this mail because:
You are on the CC list for the bug.