Skip to content
Commit 784813ae authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller
Browse files

net/smc: restrict non-blocking connect finish

The smc_poll code tries to finish connect() if the socket is in
state SMC_INIT and polling of the internal CLC-socket returns with
EPOLLOUT. This makes sense for a select/poll call following a connect
call, but not without preceding connect().
With this patch smc_poll starts connect logic only, if the CLC-socket
is no longer in its initial state TCP_CLOSE.

In addition, a poll error on the internal CLC-socket is always
propagated to the SMC socket.

With this patch the code path mentioned by syzbot
https://syzkaller.appspot.com/bug?extid=03faa2dc16b8b64be396


is no longer possible.

Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Reported-by: default avatar <syzbot+03faa2dc16b8b64be396@syzkaller.appspotmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent af3e0fcf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment