Re: [PATCH net] sctp: not bind the socket in sctp_connect

2019-06-29 Thread David Miller
From: Xin Long Date: Wed, 26 Jun 2019 16:31:39 +0800 > Now when sctp_connect() is called with a wrong sa_family, it binds > to a port but doesn't set bp->port, then sctp_get_af_specific will > return NULL and sctp_connect() returns -EINVAL. > > Then if sctp_bind() is called to bind to another po

Re: [PATCH net] sctp: not bind the socket in sctp_connect

2019-06-27 Thread Marcelo Ricardo Leitner
On Wed, Jun 26, 2019 at 04:31:39PM +0800, Xin Long wrote: > Now when sctp_connect() is called with a wrong sa_family, it binds > to a port but doesn't set bp->port, then sctp_get_af_specific will > return NULL and sctp_connect() returns -EINVAL. > > Then if sctp_bind() is called to bind to another

Re: [PATCH net] sctp: not bind the socket in sctp_connect

2019-06-27 Thread David Miller
From: Marcelo Ricardo Leitner Date: Wed, 26 Jun 2019 23:59:15 -0300 > Please give me another day to review this one. Thanks. Sure, no problem.

Re: [PATCH net] sctp: not bind the socket in sctp_connect

2019-06-26 Thread Marcelo Ricardo Leitner
On Wed, Jun 26, 2019 at 04:31:39PM +0800, Xin Long wrote: > Now when sctp_connect() is called with a wrong sa_family, it binds > to a port but doesn't set bp->port, then sctp_get_af_specific will > return NULL and sctp_connect() returns -EINVAL. > > Then if sctp_bind() is called to bind to another

[PATCH net] sctp: not bind the socket in sctp_connect

2019-06-26 Thread Xin Long
Now when sctp_connect() is called with a wrong sa_family, it binds to a port but doesn't set bp->port, then sctp_get_af_specific will return NULL and sctp_connect() returns -EINVAL. Then if sctp_bind() is called to bind to another port, the last port it has bound will leak due to bp->port is NULL