android_kernel_motorola_sm6375/net/unix
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hannes Frederic Sowa 415e3d3e90 unix: correctly track in-flight fds in sending process user_struct
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 <[email protected]>
Cc: David Herrmann <[email protected]>
Cc: Willy Tarreau <[email protected]>
Cc: Linus Torvalds <[email protected]>
Suggested-by: Linus Torvalds <[email protected]>
Signed-off-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2016-02-08 10:30:42 -05:00
..
af_unix.c unix: correctly track in-flight fds in sending process user_struct 2016-02-08 10:30:42 -05:00
diag.c VFS: net/unix: d_backing_inode() annotations 2015-04-15 15:06:56 -04:00
garbage.c unix: correctly track in-flight fds in sending process user_struct 2016-02-08 10:30:42 -05:00
Kconfig
Makefile
sysctl_net_unix.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00