Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp579084pxj; Fri, 28 May 2021 10:20:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAvLf0MVIVcKdu6gs6pfSwgPd0+3k3nVkD6Se1o22focIP7B8hYY1jF+hKr5L+jNiI1/pT X-Received: by 2002:a5d:980b:: with SMTP id a11mr7946628iol.47.1622222448989; Fri, 28 May 2021 10:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622222448; cv=none; d=google.com; s=arc-20160816; b=Ul79HVXsPXxrLuqum4O1o7qV7Fo5L+o3e0I/ETuc3NdFqd1i5Y8QWsyaniNObYqjFs SXl2i3nyJJ9axMSssWDJyblV/3HSgCGWvHPtuhqUGiFDyVE/HNbSqM3yClsH1qDda1wb 06iEdkJ2yvhLhf6hS7ELT2kfQAaXLYIDECX6/1MOjihF45YKbozYc5qdzSaXf0RBixBW bMT1FAVHW0hpQzPZ6UXFMqBZm4dmOZLL6rMTA5vBRRItkPwXppd+Ol+RM4O0DPZvE36U pChyO+IIgCtssOVC7J+s3HSZMfdjPF1kML/FN3rsJS/01FGz9wZP/khZGyw/TKg//eO0 Cc2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jdSDHqrpODkjWfBbbyG6vrMb009iDQOh1kwEFeMeXVQ=; b=G9sKv4wGN7yRpCNaP/YsVPStZ1TNf8Wkluiv0M5wgv2q5Uuv5g42N/o0yrXp9lVVq9 rUogitj2T8OOr8h1Vprv+FmaK/lyGmCsuqZU8iXroLBtjdhL008/Mf5xDV0nzwV8Dp57 JZ0P9nL2RfamxM8Tfgf77TKPd4aKcsRujHlrx3x/0MREV+vuLOgsT3vdYgIdZmoC6OPr Q4OgWo7Qo8q0i6dgmf+GDeXBD+MczNR7BNqSlZ92fC9xFejZU9anIsrPTAWCQFqSRkx3 W+nziJig+rja3xvg0UJSNXgwuRuleEk3IM86zsKKx7CYAWSRc6v3SnZFdLYRqLxnMFv2 45GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JqDww1mm; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si7377400jat.83.2021.05.28.10.20.36; Fri, 28 May 2021 10:20:48 -0700 (PDT) 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=@chromium.org header.s=google header.b=JqDww1mm; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234315AbhE1RQO (ORCPT + 99 others); Fri, 28 May 2021 13:16:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229599AbhE1RQJ (ORCPT ); Fri, 28 May 2021 13:16:09 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BB0CC061574 for ; Fri, 28 May 2021 10:14:33 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id m8-20020a17090a4148b029015fc5d36343so2910809pjg.1 for ; Fri, 28 May 2021 10:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jdSDHqrpODkjWfBbbyG6vrMb009iDQOh1kwEFeMeXVQ=; b=JqDww1mmvzIwNQsCG0aunTaF8NLcrJ0Ibo9IfukAcFtkxDz1RT+h5IH3I6n61mpYfV SBce2TSfwOSlKsp8BgY0uPzalxWGBM9cXO2qx7/jvVFNOMnmjjKy6gRG0j0CS+CQCQCK gDT+Y/5uMTCjknH3QY1BFZiEHumHYubymuQ2w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jdSDHqrpODkjWfBbbyG6vrMb009iDQOh1kwEFeMeXVQ=; b=r0Op3exMW8wyBIf4ib1/gGurFyWStuJ5KQ8fNmn1glJwV/vhWA+PrIgQtEyTPMQTKl EMkAdSOzNLwV6ZTRcERXOVu7UBid1xtiSyNrEvSbvN3aBqIIkcCCyChyFMolhYv4FsIq Tad3zY3vp7hbBJ2zWu/H4Z3kn2d57trvidBaikgt0CPY7JDZ8NO3uhwxEPcuWo0dGK7o X68ZY01rIIB7XVqEvpwF31bpja8pPwq1n8fwGWo3mY4nAE52HsiIZIzi34pNwy98HGe4 ynvB1rpMRzV+7NVc9E8xdMyokGC7CKPgNQn3lhPKwWO2vBJ4MN8mhJEwh0ec3/NGjq4I MUVA== X-Gm-Message-State: AOAM5319AOi0zSqM1fKb07pfOm4D7QG98mTfs6DeT9hJkzjribb8UAvy v6uN95FV7+e9lOpszCdy1z4Qyw== X-Received: by 2002:a17:90a:6343:: with SMTP id v3mr5530405pjs.61.1622222072618; Fri, 28 May 2021 10:14:32 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id p15sm4816757pjb.8.2021.05.28.10.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 May 2021 10:14:32 -0700 (PDT) Date: Fri, 28 May 2021 10:14:31 -0700 From: Kees Cook To: Rodrigo Campos Cc: Sargun Dhillon , LKML , containers@lists.linux.dev, Tycho Andersen , Andy Lutomirski , Mauricio =?iso-8859-1?Q?V=E1squez?= Bernal , Giuseppe Scrivano , Christian Brauner , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= Subject: Re: [PATCH v2 2/4] seccomp: Refactor notification handler to prepare for new semantics Message-ID: <202105281014.EECE3D3048@keescook> References: <20210517193908.3113-1-sargun@sargun.me> <20210517193908.3113-3-sargun@sargun.me> <202105271137.C491991621@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 28, 2021 at 05:27:39PM +0200, Rodrigo Campos wrote: > On Thu, May 27, 2021 at 8:42 PM Kees Cook wrote: > > > > On Thu, May 27, 2021 at 01:51:13PM +0200, Rodrigo Campos wrote: > > > > > > Kees, as I mentioned in the linked thread, this issue is present in > > > 5.9+ kernels. Should we add the cc to stable for this patch? Or should > > > we cc to stable the one linked, that just fixes the issue without > > > semantic changes to userspace? > > > > It sounds like the problem is with Go, using addfd, on 5.9-5.13 kernels, > > yes? > > Yes. > > > Would the semantic change be a problem there? (i.e. it sounds like > > the semantic change was fine for the 5.14+ kernels, so I'm assuming it's > > fine for earlier ones too.) > > No, I don't think it will cause any problem. > > > > Just to be clear, the other patch that fixes the problem without > > > userspace visible changes is this: > > > https://lore.kernel.org/lkml/20210413160151.3301-1-rodrigo@kinvolk.io/ > > > > I'd prefer to use the now-in-next fix if we can. Is it possible to build > > a test case that triggers the race so we can have some certainty that > > any fix in -stable covers it appropriately? > > I've verified that Sargun's patch also solves the problem in mainline. > I have now also verified that it applies cleany and fixes the issue > for linux-stable/5.10.y and linux-stable/5.12.y too (without the patch > I see the problem, with the patch I don't see it). 5.11 is already > EOL, so I didn't try it (probably will work as well). Oh, btw, may I add a Tested-by: from you for this fix? Thanks! -Kees -- Kees Cook