linux/net
Thiago Rafael Becker bdcf0a423e kernel: make groups_sort calling a responsibility group_info allocators
In testing, we found that nfsd threads may call set_groups in parallel
for the same entry cached in auth.unix.gid, racing in the call of
groups_sort, corrupting the groups for that entry and leading to
permission denials for the client.

This patch:
 - Make groups_sort globally visible.
 - Move the call to groups_sort to the modifiers of group_info
 - Remove the call to groups_sort from set_groups

Link: http://lkml.kernel.org/r/20171211151420.18655-1-thiago.becker@gmail.com
Signed-off-by: Thiago Rafael Becker <thiago.becker@gmail.com>
Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
Reviewed-by: NeilBrown <neilb@suse.com>
Acked-by: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-12-14 16:00:49 -08:00
..
6lowpan
9p make sock_alloc_file() do sock_release() on failures 2017-12-05 18:39:29 -05:00
802
8021q
appletalk
atm
ax25
batman-adv
bluetooth
bpf
bridge
caif
can
ceph
core Revert "net: core: maybe return -EEXIST in __dev_alloc_name" 2017-12-05 11:29:48 -05:00
dcb
dccp dccp: CVE-2017-8824: use-after-free in DCCP code 2017-12-05 18:08:53 -05:00
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154
ife
ipv4 tcp: evaluate packet losses upon RTT change 2017-12-08 14:14:11 -05:00
ipv6 adding missing rcu_read_unlock in ipxip6_rcv 2017-12-07 13:59:37 -05:00
ipx
iucv
kcm make sock_alloc_file() do sock_release() on failures 2017-12-05 18:39:29 -05:00
key
l2tp
l3mdev
lapb
llc
mac80211
mac802154
mpls
ncsi
netfilter
netlabel
netlink
netrom
nfc
nsh
openvswitch
packet
phonet
psample
qrtr
rds rds: Fix NULL pointer dereference in __rds_rdma_map 2017-12-06 15:44:27 -05:00
rfkill
rose
rxrpc
sched net_sched: use macvlan real dev trans_start in dev_trans_start() 2017-12-06 15:34:10 -05:00
sctp make sock_alloc_file() do sock_release() on failures 2017-12-05 18:39:29 -05:00
smc
strparser
sunrpc kernel: make groups_sort calling a responsibility group_info allocators 2017-12-14 16:00:49 -08:00
switchdev
tipc tipc: fix memory leak in tipc_accept_from_sock() 2017-12-05 14:52:41 -05:00
tls
unix
vmw_vsock VSOCK: fix outdated sk_state value in hvs_release() 2017-12-05 15:07:37 -05:00
wimax
wireless
x25
xfrm
Kconfig
Makefile
compat.c
socket.c make sock_alloc_file() do sock_release() on failures 2017-12-05 18:39:29 -05:00
sysctl_net.c