linux_old1/net/sctp
Daniel Borkmann e9c0dfbaa2 net: sctp: sctp_v6_get_dst: fix boolean test in dst cache
We walk through the bind address list and try to get the best source
address for a given destination. However, currently, we take the
'continue' path of the loop when an entry is invalid (!laddr->valid)
*and* the entry state does not equal SCTP_ADDR_SRC (laddr->state !=
SCTP_ADDR_SRC).

Thus, still, invalid entries with SCTP_ADDR_SRC might not 'continue'
as well as valid entries with SCTP_ADDR_{NEW, SRC, DEL}, with a possible
false baddr and matchlen as a result, causing in worst case dst route
to be false or possibly NULL.

This test should actually be a '||' instead of '&&'. But lets fix it
and make this a bit easier to read by having the condition the same way
as similarly done in sctp_v4_get_dst.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-13 13:42:34 -05:00
..
Kconfig sctp: fix Kconfig bug in default cookie hmac selection 2013-01-07 09:27:06 -08:00
Makefile sctp: implement sctp association probing module 2010-04-30 22:41:09 -04:00
associola.c sctp: Add RCU protection to assoc->transport_addr_list 2012-12-07 14:15:04 -05:00
auth.c net: sctp: sctp_auth_key_put: use kzfree instead of kfree 2013-02-07 23:43:42 -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 [SCTP]: Remove sctp_add_cmd_sf wrapper bloat 2008-03-27 17:54:29 -07:00
debug.c sctp: remove completely unsed EMPTY state 2011-04-20 01:51:03 -07:00
endpointola.c net: sctp: sctp_endpoint_free: zero out secret key data 2013-02-08 14:54:24 -05:00
input.c sctp: fix a typo in prototype of __sctp_rcv_lookup() 2012-10-04 15:53:48 -04: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
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 sctp: refactor sctp_outq_teardown to insure proper re-initalization 2013-01-17 18:39:56 -05:00
primitive.c sctp: Push struct net down to sctp_chunk_event_lookup 2012-08-14 23:30:37 -07:00
probe.c sctp: jsctp_sf_eat_sack: fix jprobes function signature mismatch 2012-12-15 17:14:39 -08:00
proc.c sctp: Add RCU protection to assoc->transport_addr_list 2012-12-07 14:15:04 -05:00
protocol.c sctp: Change defaults on cookie hmac selection 2012-12-15 17:14:38 -08:00
sm_make_chunk.c sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call 2012-12-03 13:32:15 -05:00
sm_sideeffect.c sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call 2012-12-03 13:32:15 -05:00
sm_statefuns.c sctp: set association state to established in dupcook_a handler 2013-01-27 19:32:23 -05:00
sm_statetable.c sctp: Make sysctl tunables per net 2012-08-14 23:32:16 -07:00
socket.c net: sctp: sctp_setsockopt_auth_key: use kzfree instead of kfree 2013-02-08 14:54:24 -05:00
ssnmap.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sysctl.c SCTP: Free the per-net sysctl table on net exit. v2 2013-01-28 00:09:32 -05:00
transport.c sctp: Add RCU protection to assoc->transport_addr_list 2012-12-07 14:15:04 -05:00
tsnmap.c sctp: use bitmap_weight 2012-11-17 22:01:18 -05:00
ulpevent.c netvm: prevent a stream-specific deadlock 2012-07-31 18:42:47 -07:00
ulpqueue.c sctp: Clean up type-punning in sctp_cmd_t union 2012-11-03 14:54:55 -04:00