Xin Long
dae399d7fd
sctp: hold transport instead of assoc when lookup assoc in rx path
...
Prior to this patch, in rx path, before calling lock_sock, it needed to
hold assoc when got it by __sctp_lookup_association, in case other place
would free/put assoc.
But in __sctp_lookup_association, it lookup and hold transport, then got
assoc by transport->assoc, then hold assoc and put transport. It means
it didn't hold transport, yet it was returned and later on directly
assigned to chunk->transport.
Without the protection of sock lock, the transport may be freed/put by
other places, which would cause a use-after-free issue.
This patch is to fix this issue by holding transport instead of assoc.
As holding transport can make sure to access assoc is also safe, and
actually it looks up assoc by searching transport rhashtable, to hold
transport here makes more sense.
Note that the function will be renamed later on on another patch.
Signed-off-by: Xin Long <[email protected] >
Acked-by: Marcelo Ricardo Leitner <[email protected] >
Signed-off-by: David S. Miller <[email protected] >
2016-10-31 16:20:33 -04:00
..
6lowpan
6lowpan: ndisc: no overreact if no short address is available
2016-09-19 20:19:34 +02:00
9p
IB/core: add support to create a unsafe global rkey to ib_create_pd
2016-09-23 13:47:44 -04:00
802
8021q
net: add recursion limit to GRO
2016-10-20 14:32:22 -04:00
appletalk
appletalk: use IS_ENABLED() instead of checking for built-in or module
2016-09-10 21:19:10 -07:00
atm
lec: use IS_ENABLED() instead of checking for built-in or module
2016-09-10 21:19:10 -07:00
ax25
batman-adv
batman-adv: fix splat on disabling an interface
2016-10-21 14:47:02 +02:00
bluetooth
Bluetooth: Fix append max 11 bytes of name to scan rsp data
2016-10-19 18:42:37 +02:00
bridge
bridge: multicast: restore perm router ports on multicast enable
2016-10-18 13:52:13 -04:00
caif
can
ceph
mm: replace get_user_pages_unlocked() write/force parameters with gup_flags
2016-10-18 14:13:37 -07:00
core
net: mangle zero checksum in skb_checksum_help()
2016-10-31 15:29:11 -04:00
dcb
dccp
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
2016-07-29 17:38:46 -07:00
decnet
dns_resolver
dsa
net: dsa: add port fast ageing
2016-09-23 08:38:50 -04:00
ethernet
net: add recursion limit to GRO
2016-10-20 14:32:22 -04:00
hsr
net/hsr: Remove unused but set variable
2016-10-18 10:28:18 -04:00
ieee802154
ipv4
dctcp: avoid bogus doubling of cwnd after loss
2016-10-31 15:16:28 -04:00
ipv6
ipv6: add mtu lock check in __ip6_rt_update_pmtu
2016-10-31 14:24:24 -04:00
ipx
irda
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-09-23 06:46:57 -04:00
iucv
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
2016-07-29 17:38:46 -07:00
kcm
Merge branch 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2016-10-07 15:36:58 -07:00
key
l2tp
udp: must lock the socket in udp_disconnect()
2016-10-20 14:45:52 -04:00
l3mdev
net: ipv6: Remove l3mdev_get_saddr6
2016-09-10 23:12:53 -07:00
lapb
llc
llc: switch type to bool as the timeout is only tested versus 0
2016-09-17 10:05:05 -04:00
mac80211
mac80211: move struct aead_req off the stack
2016-10-17 16:14:04 +02:00
mac802154
mac802154: use rate limited warnings for malformed frames
2016-09-19 20:19:34 +02:00
mpls
mpls: move mpls_hdr to a common location
2016-10-03 02:00:21 -04:00
ncsi
net/ncsi: Improve HNCDSC AEN handler
2016-10-20 11:23:08 -04:00
netfilter
netfilter: fix nf_queue handling
2016-10-20 19:59:59 +02:00
netlabel
netlink
netlink: do not enter direct reclaim from netlink_dump()
2016-10-06 20:53:13 -04:00
netrom
nfc
openvswitch
openvswitch: add NETIF_F_HW_VLAN_STAG_TX to internal dev
2016-10-13 10:03:23 -04:00
packet
packet: on direct_xmit, limit tso and csum to supported devices
2016-10-29 15:02:15 -04:00
phonet
qrtr
rds
rds: debug messages are enabled by default
2016-10-29 15:55:57 -04:00
rfkill
rose
rose: limit sk_filter trim to payload
2016-07-13 11:53:40 -07:00
rxrpc
rxrpc: Fix checking of error from ip6_route_output()
2016-10-13 08:43:17 +01:00
sched
net_sched actions: use nla_parse_nested()
2016-10-29 15:01:01 -04:00
sctp
sctp: hold transport instead of assoc when lookup assoc in rx path
2016-10-31 16:20:33 -04:00
strparser
strparser: Propagate correct error code in strp_recv()
2016-10-12 01:51:49 -04:00
sunrpc
NFS client updates for Linux 4.9
2016-10-13 21:28:20 -07:00
switchdev
switchdev: Execute bridge ndos only for bridge ports
2016-10-19 10:58:04 -04:00
tipc
tipc: fix broadcast link synchronization problem
2016-10-29 17:21:09 -04:00
unix
skb_splice_bits(): get rid of callback
2016-10-03 20:40:56 -04:00
vmw_vsock
VSOCK: Don't dec ack backlog twice for rejected connections
2016-09-27 07:59:25 -04:00
wimax
wireless
cfg80211: process events caused by suspend before suspending
2016-10-26 07:59:52 +02:00
x25
net: x25: remove null checks on arrays calling_ae and called_ae
2016-09-09 18:13:30 -07:00
xfrm
proc: Reduce cache miss in xfrm_statistics_seq_show
2016-09-30 01:50:45 -04:00
compat.c
Kconfig
strparser: Stream parser for messages
2016-08-17 19:36:23 -04:00
Makefile
strparser: Stream parser for messages
2016-08-17 19:36:23 -04:00
socket.c
vfs: Remove {get,set,remove}xattr inode operations
2016-10-07 21:48:36 -04:00
sysctl_net.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
2016-10-06 09:52:23 -07:00