android_kernel_google_msm/net/sctp
Xufeng Zhang 3309a9750b sctp: Fix sk_ack_backlog wrap-around problem
[ Upstream commit d3217b15a1 ]

Consider the scenario:
For a TCP-style socket, while processing the COOKIE_ECHO chunk in
sctp_sf_do_5_1D_ce(), after it has passed a series of sanity check,
a new association would be created in sctp_unpack_cookie(), but afterwards,
some processing maybe failed, and sctp_association_free() will be called to
free the previously allocated association, in sctp_association_free(),
sk_ack_backlog value is decremented for this socket, since the initial
value for sk_ack_backlog is 0, after the decrement, it will be 65535,
a wrap-around problem happens, and if we want to establish new associations
afterward in the same socket, ABORT would be triggered since sctp deem the
accept queue as full.
Fix this issue by only decrementing sk_ack_backlog for associations in
the endpoint's list.

Fix-suggested-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 15:10:28 -04:00
..
associola.c sctp: Fix sk_ack_backlog wrap-around problem 2014-06-26 15:10:28 -04:00
auth.c net: sctp: sctp_auth_key_put: use kzfree instead of kfree 2013-05-01 09:41:08 -07:00
bind_addr.c
chunk.c sctp: fix -ENOMEM result with invalid user space pointer in sendto() syscall 2013-01-11 09:06:27 -08:00
command.c
debug.c
endpointola.c net: sctp: sctp_endpoint_free: zero out secret key data 2013-02-14 10:49:06 -08:00
input.c sctp: Fix list corruption resulting from freeing an association on a list 2012-08-09 08:31:42 -07:00
inqueue.c
ipv6.c net: sctp: fix ipv6 ipsec encryption bug in sctp_v6_xmit 2013-10-13 15:42:47 -07:00
Kconfig
Makefile
objcnt.c
output.c sctp: Perform software checksum if packet has to be fragmented. 2013-11-04 04:23:41 -08:00
outqueue.c sctp: fully initialize sctp_outq in sctp_outq_init 2013-08-11 15:38:44 -07:00
primitive.c
probe.c
proc.c
protocol.c
sm_make_chunk.c net: sctp: fix skb leakage in COOKIE ECHO path of chunk->auth_chunk 2014-04-26 17:13:16 -07:00
sm_sideeffect.c Revert "sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()" 2013-10-01 09:10:50 -07:00
sm_statefuns.c net: sctp: fix skb leakage in COOKIE ECHO path of chunk->auth_chunk 2014-04-26 17:13:16 -07:00
sm_statetable.c
socket.c net: sctp: test if association is dead in sctp_wake_up_waiters 2014-06-07 16:01:58 -07:00
ssnmap.c
sysctl.c
transport.c sctp: check cached dst before using it 2012-05-10 23:15:47 -04:00
tsnmap.c
ulpevent.c
ulpqueue.c