linux-stable/net/sctp
Vlad Yasevich f281563350 sctp: Use correct sideffect command in duplicate cookie handling
When SCTP is done processing a duplicate cookie chunk, it tries
to delete a newly created association.  For that, it has to set
the right association for the side-effect processing to work.
However, when it uses the SCTP_CMD_NEW_ASOC command, that performs
more work then really needed (like hashing the associationa and
assigning it an id) and there is no point to do that only to
delete the association as a next step.  In fact, it also creates
an impossible condition where an association may be found by
the getsockopt() call, and that association is empty.  This
causes a crash in some sctp getsockopts.

The solution is rather simple.  We simply use SCTP_CMD_SET_ASOC
command that doesn't have all the overhead and does exactly
what we need.

Reported-by: Karl Heiss <kheiss@gmail.com>
Tested-by: Karl Heiss <kheiss@gmail.com>
CC: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Vlad Yasevich <vyasevich@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-13 09:59:21 -04:00
..
associola.c sctp: convert to idr_alloc() 2013-02-27 19:10:20 -08:00
auth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-08 18:02:14 -05:00
bind_addr.c sctp: Make sysctl tunables per net 2012-08-14 23:32:16 -07:00
chunk.c sctp: fix -ENOMEM result with invalid user space pointer in sendto() syscall 2012-11-28 11:11:17 -05:00
command.c
debug.c sctp: remove completely unsed EMPTY state 2011-04-20 01:51:03 -07:00
endpointola.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-03-05 18:42:29 -08:00
input.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
inqueue.c sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call 2012-12-03 13:32:15 -05:00
ipv6.c net: sctp: sctp_v6_get_dst: fix boolean test in dst cache 2013-02-13 13:42:34 -05:00
Kconfig net, sctp: remove CONFIG_EXPERIMENTAL 2013-02-13 13:57:27 -05:00
Makefile sctp: implement sctp association probing module 2010-04-30 22:41:09 -04:00
objcnt.c sctp: Make the proc files per network namespace. 2012-08-14 23:29:53 -07:00
output.c sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call 2012-12-03 13:32:15 -05:00
outqueue.c net: remove redundant check for timer pending state before del_timer 2013-02-04 13:26:49 -05:00
primitive.c sctp: Push struct net down to sctp_chunk_event_lookup 2012-08-14 23:30:37 -07:00
probe.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
proc.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
protocol.c sctp: make sctp_addr_wq_timeout_handler static 2012-12-28 20:32:36 -08:00
sm_make_chunk.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-02-21 17:40:58 -08:00
sm_sideeffect.c net: remove redundant check for timer pending state before del_timer 2013-02-04 13:26:49 -05:00
sm_statefuns.c sctp: Use correct sideffect command in duplicate cookie handling 2013-03-13 09:59:21 -04:00
sm_statetable.c sctp: Make sysctl tunables per net 2012-08-14 23:32:16 -07:00
socket.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-03-05 18:42:29 -08:00
ssnmap.c sctp: use KMALLOC_MAX_SIZE instead of its own MAX_KMALLOC_SIZE 2013-03-04 14:12:06 -05:00
sysctl.c SCTP: Free the per-net sysctl table on net exit. v2 2013-01-28 00:09:32 -05:00
transport.c net: remove redundant check for timer pending state before del_timer 2013-02-04 13:26:49 -05:00
tsnmap.c sctp: fix association hangs due to off-by-one errors in sctp_tsnmap_grow() 2013-02-28 15:34:26 -05:00
ulpevent.c netvm: prevent a stream-specific deadlock 2012-07-31 18:42:47 -07:00
ulpqueue.c sctp: fix association hangs due to partial delivery errors 2013-02-28 15:34:27 -05:00