]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix a potental access after delete in tipc_sk_join()
authorJon Maloy <jon.maloy@ericsson.com>
Wed, 10 Jan 2018 20:08:50 +0000 (21:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Jan 2018 18:43:51 +0000 (13:43 -0500)
commitd96df9eafe296091e2c145dd5134611d81f18e2d
treedd63648d661c0f053d2c5c1015fb6cce8e7e9969
parentffd564e07cc1db2f4702557b15db368edcf80d68
tipc: fix a potental access after delete in tipc_sk_join()

In commit 887cf84344dd "tipc: send out join messages as soon as new
member is discovered") we added a call to the function tipc_group_join()
without considering the case that the preceding tipc_sk_publish() might
have failed, and the group item already deleted.

We fix this by returning from tipc_sk_join() directly after the
failed tipc_sk_publish.

Reported-by: syzbot+e3eeae78ea88b8d6d858@syzkaller.appspotmail.com
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c