netdev-dpdk: Do not add vhost-user ports with '/' or '\' in name.
authorDaniele Di Proietto <diproiettod@vmware.com>
Wed, 3 Feb 2016 01:24:32 +0000 (17:24 -0800)
committerDaniele Di Proietto <diproiettod@vmware.com>
Wed, 24 Feb 2016 02:34:37 +0000 (18:34 -0800)
commit1af27e8a4e08ac993834bcbc8ef49ef6e50a9385
tree3deec6f4d9536f0fc130c34a9f8f50d5a01b9939
parent28f479c6110cddb21e009084cc7bb82d42486cb3
netdev-dpdk: Do not add vhost-user ports with '/' or '\' in name.

This check prevents an obvious way for a vhost-user socket to escape the
intended directory.

There might be other ways to escape the directory (none comes to mind at
the moment), but this is a problem that should be properly solved by
mandatory access control.

A similar check is done for a bridge name, since that name is used as
part of a socket as well.

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
INSTALL.DPDK.md
lib/netdev-dpdk.c