Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4116566pxb; Tue, 10 Nov 2020 08:18:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzk9KOUoVabafuNchGZTAm92AADAhOBmfcifhDKqiz2WSPxC4WIrU+NaWDS+vguN0GVxlG6 X-Received: by 2002:a50:f68b:: with SMTP id d11mr22322499edn.64.1605025138263; Tue, 10 Nov 2020 08:18:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605025138; cv=none; d=google.com; s=arc-20160816; b=WjbnemdlemD+/cntPeg9TjggFZhOlGE0bRcnkvSfBjQpZF8TXnkzXiXbEPmlNf22Fx tkV6UmMza3IkXQIy+VNiyFZL7M+efYQ3NDe72GavfHuCScjS584jETR9YtxxnQkdvBbW rcve/mroqWfRbicWDELG+kqdp7TjXZMNp2CTGw2WfAO0BqhU3Cn5oJFPyhXKTrLoj/8T PBcjyxWIwMtAWAqTZTiuQFiqCjczvHfhMJw9Vj3cU4KZNseAaCbmDXFf/FnH66qr6xrS AlPH5QDPzfHOK3UjzM00MvuJq/Dj/CKb5VZQWG4kVoL6dEBTC425tWR4Dgi+YWEj7Tzg KZ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=SaB4O4VWnyyIq07tu845V9BQAKZVkn2H+mlBHKOq2e8=; b=EEXeI/qajrCc2onHaFt7jb0DGGJNNw57NGJH7hY8Ov4nq5L9zATOCL8GUQ6TBviTfJ H/Gh+yjqbbLO4bZI5hnomGriGOsQAWR7Bpjc87jCquJwhMsDf0SVTaL4bnlI34cSazh1 6kYd4XJo8PfWouIABmMX5rjF2A1Tr+pbvBTKFXMkt04Jed/M6rb6xvSzuSwW9cV8tGU/ EfEqcBzzw/uLMWhCdPA+66rc0H5G2c8z85uhSCFATueDwcEAqwKU8yvjWgpOw3TJopfM bp8eBsXj708Ro0yIb9CDBm73SCfgWi6xpDHxe7HbgIHoEPCLQLiUuXlBiYaEC3HvNecT 0ioQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eRHRE0GQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si9189973ejr.364.2020.11.10.08.18.34; Tue, 10 Nov 2020 08:18:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eRHRE0GQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729016AbgKJQQ7 (ORCPT + 99 others); Tue, 10 Nov 2020 11:16:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:48944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbgKJQQ5 (ORCPT ); Tue, 10 Nov 2020 11:16:57 -0500 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4DCAD206E3; Tue, 10 Nov 2020 16:16:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605025017; bh=4gmtA/yuGGJcTi7/FecgJWoThfPjpjrkVVDpswNAn04=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=eRHRE0GQdUDjBsHOwvVGyY3UMntZbQj8kYMGipRJrkAtp3MOF+S5VZPn8Y9+Qy065 X+AYPIHg84GFG4cmVT/OfNcaeNd6IYoBazm727azzL6+97st5Kv0cogUSqy6zJTr5l 7k/XI4p3rJTYb43PVCTbSuat90kb7bTXhrCt59Kg= Date: Tue, 10 Nov 2020 08:16:55 -0800 From: Jakub Kicinski To: Thadeu Lima de Souza Cascardo Cc: Kleber Sacilotto de Souza , Eric Dumazet , netdev@vger.kernel.org, Gerrit Renker , "David S. Miller" , "Gustavo A. R. Silva" , "Alexander A. Klimov" , Kees Cook , Alexey Kodanev , dccp@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] dccp: ccid: move timers to struct dccp_sock Message-ID: <20201110081655.29cbcd34@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20201110111932.GS595944@mussarela> References: <20201013171849.236025-1-kleber.souza@canonical.com> <20201013171849.236025-2-kleber.souza@canonical.com> <20201016153016.04bffc1e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201109114828.GP595944@mussarela> <20201109094938.45b230c9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201109210909.GQ595944@mussarela> <20201109131554.5f65b2fa@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> <20201109213134.GR595944@mussarela> <20201109141553.30e9d502@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> <20201110111932.GS595944@mussarela> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Nov 2020 08:19:32 -0300 Thadeu Lima de Souza Cascardo wrote: > Yeah, I agree with your initial email. The patch I submitted for that fix needs > rework, which is what I tried and failed so far. I need to get back to some > testing of my latest fix and find out what needs fixing there. > > But I am also saying that simply doing a del_timer_sync on disconnect paths > won't do, because there are non-disconnect paths where there is a CCID that we > will remove and replace and that will still trigger a timer UAF. > > So I have been working on a fix that involves a refcnt on ccid itself. But I > want to test that it really fixes the problem and I have spent most of the time > finding out a way to trigger the timer in a race with the disconnect path. Sounds good, thanks a lot for working on this! > And that same test has showed me that this timer UAF will happen regardless of > commit 2677d20677314101293e6da0094ede7b5526d2b1, which led me into stating that > reverting it should be done in any case. > > I think I can find some time this week to work a little further on the fix for > the time UAF.