netdev-dpdk: Restrict vhost_sock_dir
authorAaron Conole <aconole@redhat.com>
Fri, 29 Apr 2016 17:44:02 +0000 (13:44 -0400)
committerDaniele Di Proietto <diproiettod@vmware.com>
Fri, 29 Apr 2016 22:07:39 +0000 (15:07 -0700)
commitd8a8f353c23ee9bdcead2c3963819aba0701a595
tree71204ad42e152736a221a9f3292af9755569315d
parentbab6940971336510c1f4342cde0bc17da46b99f1
netdev-dpdk: Restrict vhost_sock_dir

Since the vhost-user sockets directory now comes from the database, it is
possible for any user with database access to program an arbitrary filesystem
location for the sockets directory. This could result in unprivileged users
creating or deleting arbitrary filesystem files by using specially crafted
names. To prevent this, 'vhost-sock-dir' is now relative to ovs_rundir()
and must not contain "..".

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
lib/netdev-dpdk.c
vswitchd/vswitch.xml