aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:03:18 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:26:28 -0500
commit30330ee00ce077de9d459c17125573ff618bd7a9 (patch)
treef771ee4498c9d80677118a4eb3d1a95e303a8eef /net/sctp
parent0906e20fa03afdb14faf7fd166bfe4ed67c8db55 (diff)
[SCTP] bug: endianness problem in sctp_getsockopt_sctp_status()
Again, invalid sockaddr passed to userland - host-endiand sin_port. Potential leak, again, but less dramatic than in previous case. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index f4d13ab79f49..b6e038a387c2 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3217,8 +3217,8 @@ static int sctp_getsockopt_sctp_status(struct sock *sk, int len,
3217 status.sstat_outstrms = asoc->c.sinit_num_ostreams; 3217 status.sstat_outstrms = asoc->c.sinit_num_ostreams;
3218 status.sstat_fragmentation_point = asoc->frag_point; 3218 status.sstat_fragmentation_point = asoc->frag_point;
3219 status.sstat_primary.spinfo_assoc_id = sctp_assoc2id(transport->asoc); 3219 status.sstat_primary.spinfo_assoc_id = sctp_assoc2id(transport->asoc);
3220 memcpy(&status.sstat_primary.spinfo_address, 3220 flip_to_n((union sctp_addr *)&status.sstat_primary.spinfo_address,
3221 &(transport->ipaddr), sizeof(union sctp_addr)); 3221 &transport->ipaddr);
3222 /* Map ipv4 address into v4-mapped-on-v6 address. */ 3222 /* Map ipv4 address into v4-mapped-on-v6 address. */
3223 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), 3223 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk),
3224 (union sctp_addr *)&status.sstat_primary.spinfo_address); 3224 (union sctp_addr *)&status.sstat_primary.spinfo_address);