From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755561AbcBCOHx (ORCPT ); Wed, 3 Feb 2016 09:07:53 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:48392 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbcBCOHv (ORCPT ); Wed, 3 Feb 2016 09:07:51 -0500 X-Sasl-enc: xUmITPsV6vOfiXhiKZHEAlw6bIo+vG93YqbNj+bcX4Py 1454508470 Subject: Re: [PATCH v2] unix: properly account for FDs passed over unix sockets To: David Herrmann , Simon McVittie References: <201601100657.u0A6vk1B025554@mail.home.local> <56B1E64F.3070206@collabora.co.uk> Cc: Willy Tarreau , "David S. Miller" , netdev , linux-kernel , Linus Torvalds , Eric Dumazet , socketpair@gmail.com, Tetsuo Handa From: Hannes Frederic Sowa Message-ID: <56B209A9.5030402@stressinduktion.org> Date: Wed, 3 Feb 2016 15:07:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03.02.2016 12:56, David Herrmann wrote: > However, with Hannes' revised patch, a different DoS attack against > dbus-daemon is possible. Imagine a peer that receives batches of FDs, > but never dequeues them. They will be accounted on the inflight-limit > of dbus-daemon, as such causing messages of independent peers to be > rejected in case they carry FDs. Yes, that is true. We also kind of have the problem with unconnected af-unix dgram sockets: if the receiver does not read the skbs on the receive queue we don't free up the sending socket's wmem, thus stop the socket from being destructed and can block the process during sendmsg on this socket. This is harder to DoS but pretty much the same schema. Bye, Hannes