eal: forbid loading drivers from insecure paths
authorBruce Richardson <bruce.richardson@intel.com>
Fri, 3 Jul 2020 10:23:31 +0000 (11:23 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 5 Jul 2020 19:32:40 +0000 (21:32 +0200)
commit7b69fd1e9538ae7ab4e911eb8f56b9bd2d50d85c
treeec5f01b6e5387de77b4cf633af4f0619765426a1
parent49b536fc30606816f46b321705b282e1554dd94f
eal: forbid loading drivers from insecure paths

Any paths on the system which are world-writable are insecure and should
not be used for loading drivers. Therefore, whenever an absolute or
relative driver path is passed to EAL, check for world-writability and
don't load any drivers from that path if it is insecure. Drivers loaded
from system locations i.e. those passed without any path info and found
automatically by the loader, are excluded from these checks as system paths
are assumed to be secure.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_eal/common/eal_common_options.c