virRandomBits - not very random

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I just ran into an issue where I had about 30 guests get duplicate mac addresses assigned. These were scattered across 30 different machines.

Some debugging revealed that:

1) All the host machines were restarted within a couple seconds of each other 2) All the host machines had fairly similar libvirtd pids (within ~100 PIDs of each other)
3) Libvirt seeds the RNG using 'time(NULL) ^ getpid()'

This perfectly explains why I saw so many duplicate mac addresses.

Why is the RNG seed such a predictable value? Surely there has to be a better source of a random seed then the timestamp and the pid?

The PID seems to me to be a very bad source of any randomness. I just ran a test across 60 of our hosts. 43 of them shared their PID with at least one other machine.

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux