linux/net/sctp
Xin Long 912964eacb sctp: check af before verify address in sctp_addr_id2transport
Commit 6f29a13061 ("sctp: sctp_addr_id2transport should verify the
addr before looking up assoc") invoked sctp_verify_addr to verify the
addr.

But it didn't check af variable beforehand, once users pass an address
with family = 0 through sockopt, sctp_get_af_specific will return NULL
and NULL pointer dereference will be caused by af->sockaddr_len.

This patch is to fix it by returning NULL if af variable is NULL.

Fixes: 6f29a13061 ("sctp: sctp_addr_id2transport should verify the addr before looking up assoc")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-07 14:07:23 -05:00
..
associola.c sctp: fix recovering from 0 win with small data chunks 2016-12-23 14:01:35 -05:00
auth.c
bind_addr.c sctp: not copying duplicate addrs to the assoc's bind address list 2016-12-20 14:15:45 -05:00
chunk.c
debug.c Revert "net: sctp: fix array overrun read on sctp_timer_tbl" 2017-01-20 11:29:43 -05:00
endpointola.c sctp: sctp_epaddr_lookup_transport should be protected by rcu_read_lock 2016-12-17 11:43:23 -05:00
input.c sctp: use new rhlist interface on sctp transport rhashtable 2016-11-16 23:22:17 -05:00
inqueue.c
ipv6.c tcp: don't annotate mark on control socket from tcp_v6_send_response() 2017-01-27 10:33:56 -05:00
Kconfig
Makefile
objcnt.c
offload.c sctp: sctp gso should set feature with NETIF_F_SG when calling skb_segment 2017-01-25 12:28:33 -05:00
output.c sctp: clean up sctp_packet_transmit 2016-11-02 15:03:13 -04:00
outqueue.c sctp: Fix spelling mistake: "Atempt" -> "Attempt" 2017-01-11 10:01:01 -05:00
primitive.c
probe.c
proc.c
protocol.c sctp: not copying duplicate addrs to the assoc's bind address list 2016-12-20 14:15:45 -05:00
sctp_diag.c
sm_make_chunk.c
sm_sideeffect.c
sm_statefuns.c sctp: validate chunk len before actually using it 2016-10-29 12:00:10 -04:00
sm_statetable.c
socket.c sctp: check af before verify address in sctp_addr_id2transport 2017-02-07 14:07:23 -05:00
ssnmap.c
sysctl.c
transport.c ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
tsnmap.c
ulpevent.c
ulpqueue.c