summaryrefslogtreecommitdiffstats
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki2008-05-29 12:55:05 +0200
committerYOSHIFUJI Hideaki2008-06-04 21:02:30 +0200
commite51171019bb0e1f9fb57c25bd2e38ce652eaea27 (patch)
tree6adf7c9e23c54de5a2b361c8e59d692a29e7541e /net/sctp/protocol.c
parentax25: Fix NULL pointer dereference and lockup. (diff)
downloadkernel-qcow2-linux-e51171019bb0e1f9fb57c25bd2e38ce652eaea27.tar.gz
kernel-qcow2-linux-e51171019bb0e1f9fb57c25bd2e38ce652eaea27.tar.xz
kernel-qcow2-linux-e51171019bb0e1f9fb57c25bd2e38ce652eaea27.zip
[SCTP]: Fix NULL dereference of asoc.
Commit 7cbca67c073263c179f605bdbbdc565ab29d801d ("[IPV6]: Support Source Address Selection API (RFC5014)") introduced NULL dereference of asoc to sctp_v6_get_saddr in net/sctp/ipv6.c. Pointed out by Johann Felix Soden <johfel@users.sourceforge.net>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 0ec234b762c2..13ee7fa92e07 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -519,7 +519,8 @@ out:
/* For v4, the source address is cached in the route entry(dst). So no need
* to cache it separately and hence this is an empty routine.
*/
-static void sctp_v4_get_saddr(struct sctp_association *asoc,
+static void sctp_v4_get_saddr(struct sctp_sock *sk,
+ struct sctp_association *asoc,
struct dst_entry *dst,
union sctp_addr *daddr,
union sctp_addr *saddr)