Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4143305pxk; Tue, 8 Sep 2020 11:45:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh/k9cnuCn6YrX48We/p68YrlUxLMVf02TOixyP025BK5tGJ7Nyz1M0cFrJ0IrZrpw+Onl X-Received: by 2002:a17:906:194b:: with SMTP id b11mr26588695eje.159.1599590725982; Tue, 08 Sep 2020 11:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599590725; cv=none; d=google.com; s=arc-20160816; b=Je9FtgUflydTguZAYc2HVIMS0HEPL3gCuowdo7ZnASfYgObbI0ds98ahktM+de3+JK 8pGK6TRT0m/gKg+IuMXtQ8k50sNjqPnxHk34O7xd1p1Nh+d7ioYXblkshnz8+90dc1uU GZyreS8aSudvq6LiH8d3BqYcYFhi7Ooba0/3g4pPlmd5PsWAXkwUqFcl8/c3tOU8Xzp4 IjY2hTqZRm2jMJyrmSU/nLw2G07+cjUQTAQ+fC5HAZHM0wbTzPyWbEeyFfGfMuiSXg2U 8P0hkbgNdZTNGLZLFLmwhBXIaMv/roWhqm7QKM1gij0DLSladJgCCWX54seybTzqcbOM Mq1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4D/aBydAA1LQTR6RAnjefSXva1fBhHAgDj3nNAcVY8w=; b=PNGujKIxsjtrJ+Meq8ov/5eNjc1zpNACD0VT5XChe/AzW3W317cLiFXhm55T4UF+rv YwgZlJ9erSWLPVVEoCjibGwokCz/PeDylevFSrFw9uovpPb4M++pTCSYfYLY1TfrmyfB u9CkzrEemYBSIazey4IPfikNTjBDwdX1jzsxq42I7OzZtSIO1+2wnmQmYgkPTVY0cNk/ ou1vAWbjdhGP3/eNTStOpesND8yhuJ0SbVYWTNP8LbV5kcw/ZYAgFTryQek1QrzQIk2b Us+mlpDrfnSFjiXfgNtuINQTVv4TDXckMN7ZHYneebjZqOCrMhQ5Bh5giD16562mH5Zd KZ9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=I4oOZtQZ; 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 u18si12293318edy.380.2020.09.08.11.45.03; Tue, 08 Sep 2020 11:45:25 -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=I4oOZtQZ; 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 S1731331AbgIHSlq (ORCPT + 99 others); Tue, 8 Sep 2020 14:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731672AbgIHSlX (ORCPT ); Tue, 8 Sep 2020 14:41:23 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8262C061573 for ; Tue, 8 Sep 2020 11:41:22 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id k15so11680234pfc.12 for ; Tue, 08 Sep 2020 11:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4D/aBydAA1LQTR6RAnjefSXva1fBhHAgDj3nNAcVY8w=; b=I4oOZtQZOez0KddVN7dcksQoTwbdyJ4OxlmiCG5XMety1n6ClKEETrC0Mu6j69oojo stSVa0WCmNiybsE3lhIPzIe140XnltOX87QuxwhmqeK31Rlj3Lr3L15m3ZaIeYN3+rGx 4vRD+i8ONfe9NUCmyF0fFWG/+x1lIQnTMI57s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4D/aBydAA1LQTR6RAnjefSXva1fBhHAgDj3nNAcVY8w=; b=KLzfP1PxPTJatg2k5B2EJEz3Iys6QeNUIziKYHN2WptWjGYSc1wz4GcwaMivLg+hNi VsItEE4+QadsP/YDrDccVzCSs7JQjlZURGce3Gtt2WIFfX2gcPzlNWSeg7cO4Kg02tuu ghU0iO6uGQV9tmjFUKsOATRtLV6LVZSuGo6jFlfvm9YDDvJMCiCMpZx3XpO4MtQ0HN8t AEmG74lCstDop0j/YHjgzW9ztYIQh+bxMNGJblc15JCJvShelT8BhLgEUk2QCqFWUcFI Yo1VzY+fRM5XfVZrzociRuFxOjY5E0VYpLG7yI/FfgkzdIf+TWLUNDRu8IknPHkQr66P UBgQ== X-Gm-Message-State: AOAM530K/WKrhRMeBGmu1Tzt7uI4tt5bX5MZpatDh5oRqHSiOg9tW0Ks dtjXmQAnmvNEF1b4gEj6egF00w== X-Received: by 2002:a63:a55e:: with SMTP id r30mr88910pgu.61.1599590482423; Tue, 08 Sep 2020 11:41:22 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id s68sm148767pfb.91.2020.09.08.11.41.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:41:21 -0700 (PDT) From: Kees Cook To: Tycho Andersen Cc: Kees Cook , syzbot+3ad9614a12f80994c32e@syzkaller.appspotmail.com, "Tobin C . Harding" , Christian Brauner , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] seccomp: don't leak memory when filter install races Date: Tue, 8 Sep 2020 11:40:57 -0700 Message-Id: <159959037666.1186953.15847741084926154331.b4-ty@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902014017.934315-1-tycho@tycho.pizza> References: <20200902014017.934315-1-tycho@tycho.pizza> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 Sep 2020 19:40:16 -0600, Tycho Andersen wrote: > In seccomp_set_mode_filter() with TSYNC | NEW_LISTENER, we first initialize > the listener fd, then check to see if we can actually use it later in > seccomp_may_assign_mode(), which can fail if anyone else in our thread > group has installed a filter and caused some divergence. If we can't, we > partially clean up the newly allocated file: we put the fd, put the file, > but don't actually clean up the *memory* that was allocated at > filter->notif. Let's clean that up too. > > [...] Applied, thanks! [1/2] seccomp: don't leak memory when filter install races https://git.kernel.org/kees/c/a566a9012acd [2/2] mailmap, MAINTAINERS: move to tycho.pizza https://git.kernel.org/kees/c/19d1d49f2a8c Best regards, -- Kees Cook