lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140122153235.GC7269@order.stressinduktion.org>
Date:	Wed, 22 Jan 2014 16:32:35 +0100
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	Dan Ballard <dan@...dstab.net>,
	Lennart Poettering <lennart@...ttering.net>,
	kay.sievers@...y.org, Arnd Bergmann <arnd@...db.de>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Eliezer Tamir <eliezer.tamir@...ux.intel.com>,
	Neil Horman <nhorman@...driver.com>,
	Li Zefan <lizefan@...wei.com>, linux-arch@...r.kernel.org,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/1] Per socket value for max datagram queue length

On Wed, Jan 22, 2014 at 04:20:36PM +0100, Hannes Frederic Sowa wrote:
> On Wed, Jan 22, 2014 at 07:11:20AM -0800, Dan Ballard wrote:
> > diff --git a/net/core/sock.c b/net/core/sock.c
> > index 5393b4b..1ff69d1 100644
> > --- a/net/core/sock.c
> > +++ b/net/core/sock.c
> > @@ -915,6 +915,10 @@ set_rcvbuf:
> >                                          sk->sk_max_pacing_rate);
> >                 break;
> > 
> > +       case SO_MAX_DGRAM_QLEN:
> > +               sk->sk_max_ack_backlog = val;
> > +               break;
> > +
> 
> Shouldn't the backlog be capped for unprivileged users to some configurable
> value? I even think that max_dgram_qlen should be the upper bound.
> 
> I guess it is not that serious as socket read accounting does account all
> packets which sit in the backlog queue.

Just a follow-up:

sk_max_ack_backlog is also responsible for limiting the af_unix
dgram queues.  Currently there is no socket accounting for the read
side of those unix dgram sockets. I tried to fix this once here,
http://patchwork.ozlabs.org/patch/231032/, but until that is done we
depend on max_dgram_qlen to limit those queues at all.

I hope I can get back to this patch anytime soon, as it solves the problem
that a bidirectional protocol ping-ponging with a dgram server socket
and not fetching its messages from the backlog queue can bring a server
to halt because it doesn't have any send space on the socket anymore.

Greetings,

  Hannes

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ