]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: allocate sctp_sockaddr_entry with kzalloc
authorXin Long <lucien.xin@gmail.com>
Mon, 14 Jan 2019 10:34:02 +0000 (18:34 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jan 2019 21:38:06 +0000 (13:38 -0800)
commit16e295aa81aac7b47b3dbe9b023c4bf78343771f
tree958d9769d5932615819baaac4b232fdfb9f1bf30
parentf6ed7126ce099246c080968fd76f577e554d4c6b
sctp: allocate sctp_sockaddr_entry with kzalloc

The similar issue as fixed in Commit c76e8455a9b4 ("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@google.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reported-by: syzbot+ae0c70c0c2d40c51bb92@syzkaller.appspotmail.com
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/ipv6.c
net/sctp/protocol.c