From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934206AbcATPBJ (ORCPT ); Wed, 20 Jan 2016 10:01:09 -0500 Received: from helcar.hengli.com.au ([209.40.204.226]:59378 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751367AbcATPBH (ORCPT ); Wed, 20 Jan 2016 10:01:07 -0500 Date: Wed, 20 Jan 2016 23:00:20 +0800 From: Herbert Xu To: "Wan, Kaike" Cc: "Eric W. Biederman" , Richard Weinberger , "David S. Miller" , Thomas Graf , Daniel Borkmann , Ken-ichirou MATSUZAWA , Nicolas Dichtel , Florian Westphal , netdev , LKML , syzkaller , Kostya Serebryany , Alexander Potapenko , Sasha Levin , Eric Dumazet , Dmitry Vyukov , "Fleck, John" , "Weiny, Ira" , Doug Ledford , Jason Gunthorpe Subject: Re: net: GPF in __netlink_ns_capable Message-ID: <20160120150020.GA25156@gondor.apana.org.au> References: <20160118092047.GA30682@gondor.apana.org.au> <878u3m7i5q.fsf@x220.int.ebiederm.org> <87vb6q63co.fsf@x220.int.ebiederm.org> <3F128C9216C9B84BB6ED23EF16290AFB185A437D@CRSMSX101.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F128C9216C9B84BB6ED23EF16290AFB185A437D@CRSMSX101.amr.corp.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2016 at 02:35:59PM +0000, Wan, Kaike wrote: > >From the code (netlink_dump() in net/netlink/af_netlink.c), it shows that a skb is allocated without initializing the skb->cb[] field, which will cause oops if netlink_capable() is called with the duplicate skb. This will happen if the netlink_dump_start() path is followed (in ibnl_rcv_msg() in drivers/infiniband/core/netlink.c). However, for the IB netlink local service, we handle only request RDMA_NL_LS_OP_SET_TIMEOUT and response to RDMA_NL_LS_OP_RESOLVE, which directly call the registered dump function (ib_nl_handle_resolve_resp() and ib_nl_handle_resolve_resp()). See the following snippet: You'll find a reproducer in the original email: http://lkml.iu.edu/hypermail/linux/kernel/1601.1/06505.html Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt