From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [net-next 1/1] tipc: Fix missing list initializations in struct tipc_subscription Date: Wed, 04 Apr 2018 11:34:10 -0400 (EDT) Message-ID: <20180404.113410.421466320676780022.davem@davemloft.net> References: <1522775479-16746-1-git-send-email-jon.maloy@ericsson.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, mohan.krishna.ghanta.krishnamurthy@ericsson.com, tung.q.nguyen@dektech.com.au, hoang.h.le@dektech.com.au, canh.d.luu@dektech.com.au, ying.xue@windriver.com, tipc-discussion@lists.sourceforge.net To: jon.maloy@ericsson.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:40302 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751924AbeDDPeN (ORCPT ); Wed, 4 Apr 2018 11:34:13 -0400 In-Reply-To: <1522775479-16746-1-git-send-email-jon.maloy@ericsson.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jon Maloy Date: Tue, 3 Apr 2018 19:11:19 +0200 > When an item of struct tipc_subscription is created, we fail to > initialize the two lists aggregated into the struct. This has so far > never been a problem, since the items are just added to a root > object by list_add(), which does not require the addee list to be > pre-initialized. However, syzbot is provoking situations where this > addition fails, whereupon the attempted removal if the item from > the list causes a crash. > > This problem seems to always have been around, despite that the code > for creating this object was rewritten in commit 242e82cc95f6 ("tipc: > collapse subscription creation functions"), which is still in net-next. > > We fix this for that commit by initializing the two lists properly. > > Fixes: 242e82cc95f6 ("tipc: collapse subscription creation functions") > Reported-by: syzbot+0bb443b74ce09197e970@syzkaller.appspotmail.com > Signed-off-by: Jon Maloy Applied, thanks Jon.