[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180116.142507.1091619802487211287.davem@davemloft.net>
Date: Tue, 16 Jan 2018 14:25:07 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: lucien.xin@...il.com
Cc: netdev@...r.kernel.org, linux-sctp@...r.kernel.org,
marcelo.leitner@...il.com, nhorman@...driver.com
Subject: Re: [PATCH net] sctp: return error if the asoc has been peeled off
in sctp_wait_for_sndbuf
From: Xin Long <lucien.xin@...il.com>
Date: Mon, 15 Jan 2018 17:01:36 +0800
> After commit cea0cc80a677 ("sctp: use the right sk after waking up from
> wait_buf sleep"), it may change to lock another sk if the asoc has been
> peeled off in sctp_wait_for_sndbuf.
>
> However, the asoc's new sk could be already closed elsewhere, as it's in
> the sendmsg context of the old sk that can't avoid the new sk's closing.
> If the sk's last one refcnt is held by this asoc, later on after putting
> this asoc, the new sk will be freed, while under it's own lock.
>
> This patch is to revert that commit, but fix the old issue by returning
> error under the old sk's lock.
>
> Fixes: cea0cc80a677 ("sctp: use the right sk after waking up from wait_buf sleep")
> Reported-by: syzbot+ac6ea7baa4432811eb50@...kaller.appspotmail.com
> Signed-off-by: Xin Long <lucien.xin@...il.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists