Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3399599imm; Fri, 24 Aug 2018 16:45:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaQypTwJSw3ZCv7UJ3xRWCbvxAyJU0gy8nTyyTKrMYYgdl6IgvZBCqMyhTPHRvbg2ivtyKD X-Received: by 2002:a63:e001:: with SMTP id e1-v6mr3599454pgh.380.1535154346568; Fri, 24 Aug 2018 16:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535154346; cv=none; d=google.com; s=arc-20160816; b=J2S86rg4vsJ22jw64uuH5EO5GtGaozkTBhTg6vhSFE0sn3Mzf5PXis239GTkNRkMv/ jHE08MuV95LMe4W5jBTrtoVbbeVNWrA07gxi842ru8Uy8eyzvPgjoUcz/T2SOSe64XBj IOYNxX2KTNpACWjVzeRH2MqIEAFlS+Mogj3t1E1YdBvWyKL+8+K02IQ3ICaWoi8ufNO3 Xw/pvQskDIie/BUMOTOYFBJbfBKw+8vyJtZr2mdZ+cAACiUfuJjTXMt5nPU/teTjbBIj 0Eb0HfLPbmW8tZ+2Ds3ORLiPh7IDOU0ZMZ4VhlHBSAuvUovEjV83N5nQoE4tgloljlj3 zpKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=bxydiVmJvEpPkDM/iVLhTMRTL1MRu+kYnyejNNvHrZU=; b=H0lWA95fTt/kkLQN6Rqz3QpICdxaBluSINcHJswKz+ZPWpADV2n0w/R7mRdg17atUX rgkzFa5ZnSj+yXnHcS6hb52bs3Up4TOGP+cUqRWlnq/Clgj7BrsT4mSwzpsmvPKXRUzG BRcIHIE8/17fSDPoBM5r6b9ILEqvJZDztk7VH0ePDbgojm5LyRrmyMqukkn6IVMNNMxg nC8omdoKMSOLdOgOW/z4Vmw8U1Jo6bFDF7d02prTpeQmaWix/tBo60CAjK4Z4xkUnIZw WLMTeqW3Vr84I6dpHSTvTpUJR+zzW0Ay9sEYUHqKaqTnfnt45XX44jyNz4HFjeah0ypl Obxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="LmW/eQ8W"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 199-v6si8261820pgg.366.2018.08.24.16.45.30; Fri, 24 Aug 2018 16:45:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="LmW/eQ8W"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727408AbeHYDOC (ORCPT + 99 others); Fri, 24 Aug 2018 23:14:02 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:42772 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726995AbeHYDOB (ORCPT ); Fri, 24 Aug 2018 23:14:01 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w7ONYC0s072657; Fri, 24 Aug 2018 23:37:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=bxydiVmJvEpPkDM/iVLhTMRTL1MRu+kYnyejNNvHrZU=; b=LmW/eQ8WvgSKKQ7NsbVvjaMzI0pYtUaQA5mPce1Nw9xqKKmlwR5cYguIvFpIjaJd48jx v94Usb0QuGD/aVJ1ZTvNqND/nPdrJD5vdikvDDZXGeeUZfIbijDyFBPEOzHVxGYSzQuz o7x9A5BXyZI6DMJ2EtsmrU3EkkhEG01KzIZKeA8JJSHKnvZKDPA7gaZ/yrDpcnEzN0GA Q4FkOm9ojrduYNaPorrzhySaeYmjJgTuCL5X2ug8eC2ba+G02+SZqaEF4WX4DgsiJ6HF ztmNl7HA3gwo9tVSACh861+Tz0CL03EsCQEyW6PNx5nIrlmU46ePIRxl3nbYBqyTl6XJ 3w== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2kxbdqjhha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Aug 2018 23:37:09 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w7ONb2OK000333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Aug 2018 23:37:02 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w7ONb1Nn010794; Fri, 24 Aug 2018 23:37:01 GMT Received: from oracle.com (/10.154.122.223) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 24 Aug 2018 16:37:01 -0700 Date: Fri, 24 Aug 2018 19:37:00 -0400 From: Sowmini Varadhan To: Dmitry Vyukov Cc: syzbot , David Miller , LKML , linux-rdma@vger.kernel.org, netdev , rds-devel@oss.oracle.com, Santosh Shilimkar , syzkaller-bugs Subject: Re: KASAN: use-after-free Read in __rhashtable_lookup (2) Message-ID: <20180824233700.GC31961@oracle.com> References: <20180824230446.GA16891@oracle.com> <000000000000d8879a05743667a2@google.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-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8995 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=829 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808240235 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (08/24/18 16:10), Dmitry Vyukov wrote: > You need a colon after dup. I see. > But this can't possibly be a dup of that bug. That bug was fixed in February: Apologies, I unknowingly made a mistake in my syzbot-tiquette in that case, I did not intend to *close* the bug as a dup, I was merely trying to indicate that this is yet another manifestation of the original report with subject "KASAN: use-after-free Read in rds_find_bound" All of these problems are happening because we are missing a synchronize_net() in rds_release. A full description of the race conditon can be found in https://www.spinics.net/lists/netdev/msg475074.html If rds_release is going to nuke the rds_socket it needs to sychronize_net() with other threads that may be looking up the bind_hash_table. If we dont do that, all of these "use-after-free" races can happen. As long as we dont have the synchronize_net() we are missing a big (and standard) bit of RCU synchronization. --Sowmini