Re: [PATCH net] sctp: allocate sctp_sockaddr_entry with kzalloc

From: David Miller
Date: Wed Jan 16 2019 - 16:38:53 EST


From: Xin Long <lucien.xin@xxxxxxxxx>
Date: Mon, 14 Jan 2019 18:34:02 +0800

> The similar issue as fixed in Commit 4a2eb0c37b47 ("sctp: initialize
> sin6_flowinfo for ipv6 addrs in sctp_inet6addr_event") also exists
> in sctp_inetaddr_event, as Alexander noticed.
>
> To fix it, allocate sctp_sockaddr_entry with kzalloc for both sctp
> ipv4 and ipv6 addresses, as does in sctp_v4/6_copy_addrlist().
>
> Reported-by: Alexander Potapenko <glider@xxxxxxxxxx>
> Signed-off-by: Xin Long <lucien.xin@xxxxxxxxx>

Applied and queued up for -stable.