From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 255B5C433FE for ; Tue, 22 Nov 2022 00:48:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231704AbiKVAs3 (ORCPT ); Mon, 21 Nov 2022 19:48:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229919AbiKVAs1 (ORCPT ); Mon, 21 Nov 2022 19:48:27 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A20B4B30 for ; Mon, 21 Nov 2022 16:47:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669078049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jfWO1iPIC4YjnRVG6Jdr+VOmWa2xaarKqFD6yPIS5pU=; b=DcA1Wyazs757uQsaWzKFoe7mWxIbO5I1WbURsc5KqTSUAouD/c2ur7mpDJGeodB3xDi19E iUqtcHjEtoQvI2OOC3KGqRGVyT6KRa7eN+vj3KAvlTr1FmTcGmH3IVRdpwpHxb7KuRwDHl nvKOCAQEISG4KLpRYqUdZH+23hLibS0= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-624-zwJ04Z64OquTkjLU3zXMmg-1; Mon, 21 Nov 2022 19:47:20 -0500 X-MC-Unique: zwJ04Z64OquTkjLU3zXMmg-1 Received: by mail-qv1-f72.google.com with SMTP id b1-20020a0cfb41000000b004c690b1dd8bso11193432qvq.6 for ; Mon, 21 Nov 2022 16:47:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jfWO1iPIC4YjnRVG6Jdr+VOmWa2xaarKqFD6yPIS5pU=; b=pHrY93RK8cizI+vnNDMRWwvXLCuAJp6Qa2gMEOdU+lvMiZ5V/VJI6Dbi7ebzHaoDGY jh3XDciMqxN0dBkvTQ0kxZdy+WtvvKxhoIon3tTujjj5O9Wv/cRHn01HIUBCuNWN3CWy 5opkbYPz1vGFtYbpqLUy4Fe/VpIB9tCKwCLX1+ORCRdoDC8FDaA82+Ih/cTet1QK7CgV ldD8cd73TiW+MmtuJergf7CKULHCY54mov6lbk6zNXHftC3V1NVl5NvoSuBoSIUnsyyG 11FbfiqKVmJQj4K40ljNWawtP2shd0paNqss5XH+DOTqKMQ+Oory5JpevByGq4A3hYCY 8FiQ== X-Gm-Message-State: ANoB5pldi5K4GnyHsrWxltPr/My40YHKGVZz6bcLmOsRapQKtF3yfi5G d8UWkhKg3jfNrq/C0URHE+AIyfZDed+VVzBCNJnoCVOJMAZ40jSndGKmBS0H06J448vNa+jF+TE A+v1D4jy2Xiqe2L1t X-Received: by 2002:ae9:df07:0:b0:6fa:12b5:8d2f with SMTP id t7-20020ae9df07000000b006fa12b58d2fmr19338734qkf.60.1669078039962; Mon, 21 Nov 2022 16:47:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf4TW63Ms8uylbg59YEPvwhnhMoLwoR2qsiMkV9MSgi0Fi5JclY69TTCOpxXThpuV8+vbo8ZFA== X-Received: by 2002:ae9:df07:0:b0:6fa:12b5:8d2f with SMTP id t7-20020ae9df07000000b006fa12b58d2fmr19338713qkf.60.1669078039685; Mon, 21 Nov 2022 16:47:19 -0800 (PST) Received: from [10.0.0.96] ([24.225.241.171]) by smtp.gmail.com with ESMTPSA id de36-20020a05620a372400b006fbb4b98a25sm9261261qkb.109.2022.11.21.16.47.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Nov 2022 16:47:19 -0800 (PST) Message-ID: Date: Mon, 21 Nov 2022 19:47:18 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH net 0/2] tipc: fix two race issues in tipc_conn_alloc Content-Language: en-US To: Xin Long , network dev , tipc-discussion@lists.sourceforge.net Cc: davem@davemloft.net, kuba@kernel.org, Eric Dumazet , Paolo Abeni , Ying Xue , Wei Chen References: From: Jon Maloy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 11/18/22 16:44, Xin Long wrote: > The race exists beteen tipc_topsrv_accept() and tipc_conn_close(), > one is allocating the con while the other is freeing it and there > is no proper lock protecting it. Therefore, a null-pointer-defer > and a use-after-free may be triggered, see details on each patch. > > Xin Long (2): > tipc: set con sock in tipc_conn_alloc > tipc: add an extra conn_get in tipc_conn_alloc > > net/tipc/topsrv.c | 20 +++++++++++--------- > 1 file changed, 11 insertions(+), 9 deletions(-) > Series Acked-by: Jon Maloy