android_kernel_samsung_univ.../net
Thiago Rafael Becker 58330ec2fe kernel: make groups_sort calling a responsibility group_info allocators
commit bdcf0a423ea1c40bbb40e7ee483b50fc8aa3d758 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10 09:27:10 +01:00
..
6lowpan
9p net/9p: Switch to wait_event_killable() 2017-11-30 08:37:25 +00:00
802
8021q vlan: fix a use-after-free in vlan_device_event() 2017-11-24 08:32:24 +01:00
appletalk
atm
ax25
batman-adv
bluetooth Bluetooth: Properly check L2CAP config option output buffer length 2017-09-13 14:09:46 -07:00
bridge net: bridge: fix early call to br_stp_change_bridge_id and plug newlink leaks 2018-01-02 20:33:26 +01:00
caif net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx 2017-07-05 14:37:14 +02:00
can
ceph libceph: force GFP_NOIO for socket allocations 2017-04-08 09:53:30 +02:00
core sock: free skb in skb_complete_tx_timestamp on error 2018-01-02 20:33:26 +01:00
dcb
dccp tcp/dccp: fix other lockdep splats accessing ireq_opt 2017-11-18 11:11:07 +01:00
decnet decnet: always not take dst->__refcnt when inserting dst into hash table 2017-07-05 14:37:14 +02:00
dns_resolver KEYS: Fix race between updating and finding a negative key 2017-10-27 10:23:18 +02:00
dsa net: dsa: select NET_SWITCHDEV 2017-11-15 17:13:11 +01:00
ethernet
hsr
ieee802154 Revert "net: fix percpu memory leaks" 2017-09-27 11:00:11 +02:00
ipv4 ipv4: Fix use-after-free when flushing FIB tables 2018-01-02 20:33:26 +01:00
ipv6 tcp md5sig: Use skb's saddr when replying to an incoming segment 2018-01-02 20:33:25 +01:00
ipx ipx: call ipxitf_put() in ioctl error path 2017-05-25 14:30:13 +02:00
irda irda: do not leak initialized list.dev to userspace 2017-08-30 10:19:21 +02:00
iucv
key af_key: do not use GFP_KERNEL in atomic contexts 2017-08-30 10:19:18 +02:00
l2tp l2tp: cleanup l2tp_tunnel_delete calls 2017-12-20 10:04:59 +01:00
l3mdev
lapb
llc
mac80211 mac80211: Fix addition of mesh configuration element 2017-12-20 10:04:52 +01:00
mac802154
mpls
netfilter netfilter: nfnetlink_queue: fix secctx memory leak 2017-12-25 14:22:13 +01:00
netlabel
netlink netlink: Add netns check on taps 2018-01-02 20:33:24 +01:00
netrom
nfc NFC: fix device-allocation error return 2017-11-30 08:37:23 +00:00
openvswitch openvswitch: fix potential out of bound access in parse_ct 2017-08-11 09:08:53 -07:00
packet net/packet: fix a race in packet_bind() and packet_notifier() 2017-12-16 10:33:56 +01:00
phonet
rds rds: Fix NULL pointer dereference in __rds_rdma_map 2017-12-16 10:33:56 +01:00
rfkill
rose
rxrpc rxrpc: Fix several cases where a padded len isn't checked in ticket decode 2017-06-29 12:48:52 +02:00
sched sch_dsmark: fix invalid skb_cow() usage 2017-12-25 14:22:10 +01:00
sctp sctp: Replace use of sockets_allocated with specified macro. 2018-01-02 20:33:25 +01:00
sunrpc kernel: make groups_sort calling a responsibility group_info allocators 2018-01-10 09:27:10 +01:00
switchdev
tipc tipc: fix memory leak in tipc_accept_from_sock() 2017-12-16 10:33:56 +01:00
unix net/unix: don't show information about sockets from other namespaces 2017-11-18 11:11:06 +01:00
vmw_vsock vsock: use new wait API for vsock_stream_sendmsg() 2017-11-30 08:37:19 +00:00
wimax
wireless nl80211: Define policy for packet pattern attributes 2017-10-18 09:20:41 +02:00
x25
xfrm xfrm: Copy policy family in clone_policy 2017-12-16 10:33:55 +01:00
compat.c audit: log 32-bit socketcalls 2017-10-08 10:14:18 +02:00
Kconfig
Makefile
socket.c net: initialize msg.msg_flags in recvfrom 2017-12-20 10:04:53 +01:00
sysctl_net.c