Systemd/src/udev/net
Lennart Poettering 550c8784c5 udev: when random MACs are requested, generate them with genuine randomness
This is a security feature, and we thus shouldn't derive the random MACs
from a potentially guessable source. MAC addresses are after all facing
to the outside, and can be interacted with from untrusted environments.
Hence, let's generate them the same way as we generate UUIDs: from
getrandom() or /dev/urandom, and optionally with RDRAND if that's
supported.

RDRAND should be fine, since this is not cryptographic key material, but
ultimately public information. We just want to make sure conflicts are
not likely.

Previously we'd generate the MACs via rand(), which means given the
short seed they are a little bit too guessable, making collisions too
likely. See #14355 in particular.

Fixes: #14355

(Note that #14355 was already fixed by
a0f11d1d11, but I think we should do
better even, and not rely on rand() and uninitialized random pools)
2020-05-20 08:25:18 +02:00
..
fuzz-link-parser.c fuzz: limit the maximum size of test inputs for a few parsers 2019-03-12 19:30:05 +01:00
fuzz-link-parser.options fuzz: limit the maximum size of test inputs for a few parsers 2019-03-12 19:30:05 +01:00
link-config-gperf.gperf link: Allow configuring RX mini and jumbo ring sizes, too 2020-04-29 18:57:13 +02:00
link-config.c udev: when random MACs are requested, generate them with genuine randomness 2020-05-20 08:25:18 +02:00
link-config.h udev: support to update flow control parameter 2020-03-07 01:43:26 +09:00