From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: problem vhost-user sockets Date: Wed, 16 Dec 2015 09:31:13 +0800 Message-ID: <20151216013113.GM29571@yliu-dev.sh.intel.com> References: <00c101d13735$e85453d0$b8fcfb70$@samsung.com> <20151215140450.GL29571@yliu-dev.sh.intel.com> <00cd01d13743$e1a7c4a0$a4f74de0$@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, 'Ilya Maximets' , 'Dyasly Sergey' To: Pavel Fedin Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id C8BF13F9 for ; Wed, 16 Dec 2015 02:31:05 +0100 (CET) Content-Disposition: inline In-Reply-To: <00cd01d13743$e1a7c4a0$a4f74de0$@samsung.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Dec 15, 2015 at 05:21:25PM +0300, Pavel Fedin wrote: > Hello! > > > I'm thinking you can't simply unlink a file given by a user inside > > a libraray unconditionaly. Say, what if a user gives a wrong socket > > path? > > Well... We can improve the security by checking that: > > a) The file exists and it's a socket. > b) Nobody is listening on it. I don't think that's enough. And the fact of the matter is you should not remove a file inside a libraray that is not created by itself. > > I normally write a short script to handle it automatically. > > I know, you can always hack up some kludges, just IMHO it's not production-grade solution. What if you are cloud administrator, and > you have 1000 users, each of them using 100 vhost-user interfaces? List all of them in some script? Too huge job, i would say. > And without it the thing just appears to be too fragile, requiring manual maintenance after a single stupid failure. You need fix the application then. The file path is constructed there after all. And if it's an open source project (say ovs), you are free to fix it then, isn't it? ;) --yliu