From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188AbcAKFF7 (ORCPT ); Mon, 11 Jan 2016 00:05:59 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:33090 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751481AbcAKFF5 (ORCPT ); Mon, 11 Jan 2016 00:05:57 -0500 Date: Mon, 11 Jan 2016 00:05:55 -0500 (EST) Message-Id: <20160111.000555.957168926959879139.davem@davemloft.net> To: w@1wt.eu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, edumazet@google.com, hannes@stressinduktion.org, socketpair@gmail.com, penguin-kernel@I-love.SAKURA.ne.jp Subject: Re: [PATCH v2] unix: properly account for FDs passed over unix sockets From: David Miller In-Reply-To: <201601100657.u0A6vk1B025554@mail.home.local> References: <201601100657.u0A6vk1B025554@mail.home.local> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 10 Jan 2016 21:05:57 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Willy Tarreau Date: Sun, Jan 10 07:54:56 CET 2016 > It is possible for a process to allocate and accumulate far more FDs than > the process' limit by sending them over a unix socket then closing them > to keep the process' fd count low. > > This change addresses this problem by keeping track of the number of FDs > in flight per user and preventing non-privileged processes from having > more FDs in flight than their configured FD limit. > > Reported-by: socketpair@gmail.com > Reported-by: Tetsuo Handa > Mitigates: CVE-2013-4312 (Linux 2.0+) > Suggested-by: Linus Torvalds > Acked-by: Hannes Frederic Sowa > Signed-off-by: Willy Tarreau Applied and queued up for -stable, thanks!