netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: unlisted-recipients:; (no To-header on input)
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	torvalds@linux-foundation.org, edumazet@google.com,
	hannes@stressinduktion.org, socketpair@gmail.com
Subject: Re: [PATCH] unix: properly account for FDs passed over unix sockets
Date: Mon, 04 Jan 2016 16:44:35 -0500 (EST)	[thread overview]
Message-ID: <20160104.164435.2254202571374844451.davem@davemloft.net> (raw)
In-Reply-To: <20151228141435.GA13351@1wt.eu>

From: Willy Tarreau <w@1wt.eu>
Date: Mon, 28 Dec 2015 15:14:35 +0100

> 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
> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Willy Tarreau <w@1wt.eu>
> ---
> It would be nice if (if accepted) it would be backported to -stable as the
> issue is currently exploitable.

As mentioned, please remove the unix_sock_count variable and
associated code as it is completely unused after this patch.

      parent reply	other threads:[~2016-01-04 21:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-28 14:14 [PATCH] unix: properly account for FDs passed over unix sockets Willy Tarreau
2015-12-29 14:37 ` Hannes Frederic Sowa
2015-12-29 14:48 ` Hannes Frederic Sowa
2015-12-29 20:35   ` Willy Tarreau
2015-12-30  8:58     ` Hannes Frederic Sowa
2015-12-30 11:23       ` Willy Tarreau
2015-12-30 13:14         ` One Thousand Gnomes
2015-12-31  6:08         ` Tetsuo Handa
2015-12-31  7:12           ` Willy Tarreau
2015-12-31 10:27             ` One Thousand Gnomes
2016-01-04 21:44 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160104.164435.2254202571374844451.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hannes@stressinduktion.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=socketpair@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).