Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14461129ybl; Mon, 30 Dec 2019 10:30:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwaFtDQCYXaRcRt7PCxdnnx8XjmMEHVKOcrKIzTriYK0TWklZZqEtXP0wkYK9bfvqbc/zbB X-Received: by 2002:aca:5f87:: with SMTP id t129mr217864oib.36.1577730649027; Mon, 30 Dec 2019 10:30:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577730649; cv=none; d=google.com; s=arc-20160816; b=j/fq2D+JpW2CZhy7+e7+LNOsIM21wbXJ0FY18U5/v68/rOiJM3EJqOVa3j6cyxegfT 1s5by5bkAlch6P4FNtS0EXkXsdpkEnWtHiEZZAGf7cl++T8PHa1/UW6/1cwKy8QnhmPZ d1iigixiT9WmVEBGnitcJmt61y+vaGGuG8Db65Oil7rruN3+rBsWDzj5TsUBD6gdpqGb JvDlCXzd4oQYnzgIHfujrxILWS9sJcN8lr213vS+xtkSc3Ui1PW/kcqb/YDWaXz5jGE5 +Atb/D08VkVZdfxr4FAAgtfHmFh+riKAqiH9j8SRJZPfLvGVWG1okx6zI8BZlE7tGo90 ihbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=d9RUOUhHNYZ8b+xHO9R34q8NE4khkHtdBl8RVjB8OyE=; b=v5s1mzB7Divuq9BOruYTnU2B6sD2iiec0hEF0rC/3Bns1Zu9lSdcYZi4pi1z0t+2ug H12Ahr52s/RhlfZULaBWCLx2PqwuUnMWLQR/ExZ79idM16ZdQf8iW75xDgyMOiTp5nDs qhg6V7kzpjGzYhSDMNyhbESrE0fhhTyWkHdeS7zYQHm+T7I8chSNQB7mu9BanHk++Cmz IYctm6oI6XySbrkLqJ3duLDeTob/x72W/mNj33zrI1OSDoRhnphGZUiwuI771EQFvtW6 3M7ntuccaHwa9OTKfnBWuOMzRRRmOXb17g211mGMRfI5MM1X6RAmf8XdCzu5Ym3mpVOv lCdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HYJPn2l+; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q131si11525041oig.203.2019.12.30.10.30.37; Mon, 30 Dec 2019 10:30:49 -0800 (PST) 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=@chromium.org header.s=google header.b=HYJPn2l+; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727577AbfL3S3r (ORCPT + 99 others); Mon, 30 Dec 2019 13:29:47 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:36157 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727504AbfL3S3r (ORCPT ); Mon, 30 Dec 2019 13:29:47 -0500 Received: by mail-ot1-f68.google.com with SMTP id 19so34742386otz.3 for ; Mon, 30 Dec 2019 10:29:46 -0800 (PST) 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=d9RUOUhHNYZ8b+xHO9R34q8NE4khkHtdBl8RVjB8OyE=; b=HYJPn2l+9Nf1Ii8FNdoU7z+ztmZohzKhAhCgRr3RN+6zN4u9yI7ORNKhiE9nqLDIvu IWUkPJ7hGmVUAiLEtRECq5FEm1puNA9nFehQeLwWvTl7RYAatnW0Q2zCYCK+pTU747A8 p10sb5KUHvyBJXiRuAZ9hkkNC6Ql477LxPfws= 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=d9RUOUhHNYZ8b+xHO9R34q8NE4khkHtdBl8RVjB8OyE=; b=YdRJOar2ffYtGPGAvc36SyxpAU4L4/JedALeZ+ctHiTwN4tmiLxnAbiQrHRRRHmiRS ARSV8f4C2226kwpHRo0Roe83UbVw2IUNNy4jGIGP2lga5ksTBXsdZaLDGJ+jQl57ivpa mbBXDr/3254u1+jBjqi94gho5y+HlaocSuDUEBSZz7hPwXxNPlmebOL0dEDwdlRaJny/ znZ2N3y57JqY6C304TL9PQtxQOHow81539JOu6fsQVW02k7ZLNbx3jPFVQzLle8LRrBG j8EyHB8Hx4K2vY9R+5etSiqLE9Cm7iPBdw3uZLqhi8H5hiUeaGkFlWC4Xk3RoW8JmRtZ 191A== X-Gm-Message-State: APjAAAX/9r3UMepnpSSgLy3AbLfU49tYdbiySTh3sxYBWmMKxXQlIBZF Bv4QUQlWfegJutRzc3qtLoEYQA== X-Received: by 2002:a9d:4b05:: with SMTP id q5mr61198349otf.174.1577730586464; Mon, 30 Dec 2019 10:29:46 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id w72sm14023710oie.49.2019.12.30.10.29.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2019 10:29:45 -0800 (PST) Date: Mon, 30 Dec 2019 10:29:44 -0800 From: Kees Cook To: Christian Brauner Cc: Sargun Dhillon , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Jann Horn , Aleksa Sarai , Tycho Andersen Subject: Re: [PATCH v3 1/3] samples, selftests/seccomp: Zero out seccomp_notif Message-ID: <201912301029.46A91074BC@keescook> References: <20191229062451.9467-1-sargun@sargun.me> <20191229161126.xcrnzdqu5frrov6q@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191229161126.xcrnzdqu5frrov6q@wittgenstein> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 29, 2019 at 05:11:28PM +0100, Christian Brauner wrote: > On Sat, Dec 28, 2019 at 10:24:49PM -0800, Sargun Dhillon wrote: > > The seccomp_notif structure should be zeroed out prior to calling the > > SECCOMP_IOCTL_NOTIF_RECV ioctl. Previously, the kernel did not check > > whether these structures were zeroed out or not, so these worked. > > > > This patch zeroes out the seccomp_notif data structure prior to calling > > the ioctl. > > > > Signed-off-by: Sargun Dhillon > > Reviewed-by: Tycho Andersen > > Cc: Kees Cook > > Cc: Christian Brauner > > Thanks! > Reviewed-by: Christian Brauner Thanks for this series and the discussion! :) I've applied this to my tree for Linus. -- Kees Cook