Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp11915695ybl; Sat, 28 Dec 2019 01:26:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxZcv6H/CJhLVqYpMG8j5p+vcMr2y4TYnlX8TMO5BoeCmUotDp5j6tYUzfIJg+6EqsZz7lk X-Received: by 2002:a9d:6f8f:: with SMTP id h15mr59053086otq.1.1577525215070; Sat, 28 Dec 2019 01:26:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577525215; cv=none; d=google.com; s=arc-20160816; b=xG7KUWYYLVAKP5W9sexUUApCig6Z/C+3ye1zIDeYrD4gBjeU3vlKT9NDh1SN5MFsNM rGHgGYA6riX3I+wcX6kSi++OBFweqgUHXWG/4gXBFUE9OYJ87WtBjc4YDhC1NNnTQuyT eLbKj8gHwSWTR0WTkP2pan7yxg3isN9eURg7A+tBUqjf1towhwwZtkviAQrLh3UMIVEY dBSkpwQqOYgnLwuJYJEjYLKd8RZgTX+o7vuYyD7yGxoqvRv+zRBYqocBvLv1UnGaiKi6 Z3wjXiPG5eFGUOrqyIIopcE8X1GJWeBn3vwNOEDC5SisHT7OdVxNiq19e2bJFglhXa8H nPzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NP2JScDDC+MbkmxTd8bCA55+hpEcQjBv+eBkJFCGHYw=; b=0edyOVVc9v0w8c4KRJZOscSg+3hd7UFkook5jFpd7iVQFctnLQbS81t7hI78uUvGyd 0BcePDp6MX49b8JtXbfgi1SAJPNYt0l5S6IwA8uk19aqokukvNNZF6IQBm7qzBKK1O+O L1jvop/0/GkynB4WoIVgRrnf7u38Qw6fLll8QhOrJuZj8U67CqrLVFrji0vvSV8YlcfT hCkVqbPk5IGa4PdFKeJJTAr5iDoIu+QgpOuRm+vEQ26wXPMnxV0DUP2ZCzjBKylHNw+N l6Gfr59FcTfbMMG/E5334xvSD9qxl8v6tw7BquXC0X2nVn+MVHCINyF6luz57m+QvTlf TaIQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j143si17699438oib.16.2019.12.28.01.26.41; Sat, 28 Dec 2019 01:26:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726395AbfL1J0E (ORCPT + 99 others); Sat, 28 Dec 2019 04:26:04 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:39297 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726071AbfL1J0D (ORCPT ); Sat, 28 Dec 2019 04:26:03 -0500 Received: from [46.183.103.8] (helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1il8MB-0001LD-5A; Sat, 28 Dec 2019 09:26:01 +0000 Date: Sat, 28 Dec 2019 10:25:34 +0100 From: Christian Brauner To: Sargun Dhillon Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, tycho@tycho.ws, jannh@google.com, keescook@chromium.org, cyphar@cyphar.com Subject: Re: [PATCH v2 1/2] samples, selftests/seccomp: Zero out seccomp_notif Message-ID: <20191228092533.wm6w3r7eyhif5pfi@wittgenstein> References: <20191228014837.GA31774@ircssh-2.c.rugged-nimbus-611.internal> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191228014837.GA31774@ircssh-2.c.rugged-nimbus-611.internal> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 28, 2019 at 01:48:39AM +0000, 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. > > Signed-off-by: Sargun Dhillon > Cc: Kees Cook Can you please also add a test, that verifies that we catch garbage values, please?