From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sowmini Varadhan Subject: Re: net/rds: use-after-free in inet_create Date: Tue, 28 Feb 2017 10:37:37 -0500 Message-ID: <20170228153737.GG31155@oracle.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Dmitry Vyukov Cc: santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org, David Miller , netdev , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, rds-devel-N0ozoZBvEnrZJqsBc5GL+g@public.gmane.org, LKML , Eric Dumazet , syzkaller List-Id: linux-rdma@vger.kernel.org On (02/28/17 15:22), Dmitry Vyukov wrote: > > Hello, > > I've got the following report while running syzkaller fuzzer on > linux-next/8d01c069486aca75b8f6018a759215b0ed0c91f0. So far it > happened only once. net was somehow deleted from underneath > inet_create. I've noticed that rds uses sock_create_kern which does > not take net reference. What is that that must keep net alive then? The rds_connection (which is where the net pointer is being obtained from) should keep the connection alive. Did you have the rds[_tcp] modules loaded at the time of failure? Were there kernel tcp sockets to/from the 16385 port? any hints on what else the test was doing (was it running a userspace RDS application that triggered the kernel TCP connection attempt in the first place)? --Sowmini -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752331AbdB1PiF (ORCPT ); Tue, 28 Feb 2017 10:38:05 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:50789 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbdB1PiB (ORCPT ); Tue, 28 Feb 2017 10:38:01 -0500 Date: Tue, 28 Feb 2017 10:37:37 -0500 From: Sowmini Varadhan To: Dmitry Vyukov Cc: santosh.shilimkar@oracle.com, David Miller , netdev , linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, LKML , Eric Dumazet , syzkaller Subject: Re: net/rds: use-after-free in inet_create Message-ID: <20170228153737.GG31155@oracle.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (02/28/17 15:22), Dmitry Vyukov wrote: > > Hello, > > I've got the following report while running syzkaller fuzzer on > linux-next/8d01c069486aca75b8f6018a759215b0ed0c91f0. So far it > happened only once. net was somehow deleted from underneath > inet_create. I've noticed that rds uses sock_create_kern which does > not take net reference. What is that that must keep net alive then? The rds_connection (which is where the net pointer is being obtained from) should keep the connection alive. Did you have the rds[_tcp] modules loaded at the time of failure? Were there kernel tcp sockets to/from the 16385 port? any hints on what else the test was doing (was it running a userspace RDS application that triggered the kernel TCP connection attempt in the first place)? --Sowmini