Files
linux/include/net
Hannes Frederic Sowa 780f6783bd unix: correctly track in-flight fds in sending process user_struct
commit 415e3d3e90 upstream.

The commit referenced in the Fixes tag incorrectly accounted the number
of in-flight fds over a unix domain socket to the original opener
of the file-descriptor. This allows another process to arbitrary
deplete the original file-openers resource limit for the maximum of
open files. Instead the sending processes and its struct cred should
be credited.

To do so, we add a reference counted struct user_struct pointer to the
scm_fp_list and use it to account for the number of inflight unix fds.

Fixes: 712f4aad40 ("unix: properly account for FDs passed over unix sockets")
Reported-by: David Herrmann <dh.herrmann@gmail.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 15:06:47 -08:00
..
2015-07-10 10:37:56 -07:00
2015-07-10 10:37:56 -07:00
2013-12-28 17:02:46 -05:00
2012-07-19 10:43:03 -07:00
2013-11-07 19:28:58 -05:00
2013-12-06 07:24:39 +01:00
2013-01-27 22:46:33 -05:00
2013-10-08 23:19:24 -04:00
2014-08-14 09:38:23 +08:00
2008-06-11 21:00:38 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2014-01-03 20:56:48 -05:00
2009-01-06 11:38:15 -07:00
2014-10-05 14:52:20 -07:00
2014-08-14 09:38:23 +08:00
2012-08-06 13:40:47 -07:00
2014-01-21 18:05:04 -08:00
2012-05-16 15:17:08 -04:00