From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752710AbdB1QRk (ORCPT ); Tue, 28 Feb 2017 11:17:40 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:37517 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751593AbdB1QQt (ORCPT ); Tue, 28 Feb 2017 11:16:49 -0500 Date: Tue, 28 Feb 2017 11:15:44 -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: <20170228161544.GH31155@oracle.com> References: <20170228153737.GG31155@oracle.com> 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: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (02/28/17 16:49), Dmitry Vyukov wrote: > > Grepping "socket" there, it was doing lots of things with sockets. Are > we looking for some particular socket type? If there are few programs > that create sockets of that type, then we can narrow down the set: Yes, we are looking for PF_RDS/AF_RDS - this should be #define AF_RDS 21 /* RDS sockets */ I see PF_KCM there (value 41) but no instances of 0x15.. how did the rds_connect_worker thread get kicked off at all? the way this is supposed to work is 1. someone modprobes rds-tcp 2. app tries to do rds_sendmsg to some ip address in a netns - this triggers the creation of an rds_connection, and subsequent kernel socket TCP connection threads (i.e., rds_connect_worker) for that netns 3. if you unload rds-tcp, the module_unload should do all the cleanup needed via rds_tcp_conn_paths_destroy. This is done Its not clear to me that the test is doing any of this... is this reproducible? let me check if there is some race window where we can restart a connection attempt when rds_tcp_kill_sock assumes that the connect worker has been quiesced.. --Sowmini