Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1088910ybb; Fri, 20 Mar 2020 13:09:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuZiq/uKeu9H95xOczdyQqdBBHOkuhc6xF1qhWiSW92GAk/TBouibpdnYf3jEKZlV8frVMA X-Received: by 2002:aca:ecd7:: with SMTP id k206mr8033298oih.113.1584734998635; Fri, 20 Mar 2020 13:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584734998; cv=none; d=google.com; s=arc-20160816; b=Pc3U3yqs0uV+polGl4cEWvFktn+MazfoCOh1v7EVoG49yDHDcvrd2VCsHCJke7XSkj rAjVgjsAOcnpqRw3HWnjfYi/umKQMn7rLkfIkpOGFscmkASPd/pUQuLttYzr9+Lh+yl6 CU8NfTzlbydHrjd8Qia5wqWhXfZlY/6HZmZPaVZrIT3UlIpU8UmZCv6eQZFAyuwlov6K g8EpgRKcLS0CVv3BVWlAIyngusMqqqr3/XZYXYR5qR/XT/6VpJD0LmYxexWqAsQHjUIs G0CFbNOliz3u1WxQiLZaUNEMRRhK9qArQNyZvOH43mltozCn5QaWDX1bIxHb3UQtBq5u AIeg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=eEq89bubtyAghAWZzSQ9RvKID45ynYf9jlsX+PJdVYc=; b=XuTK0CAtoiQ+fc4coVIw8GyBow//+Ph7pdiGpl+HOaE5JfZ3X36yVPu62sfWf4QUpP BleWCIANTvQD+W9kNSEqev1CIJwsej0TdNNs57qCEkRx+7DKjFc4gBYjt3G/6WFWhLg3 W+2kV8gaMjPnpc292VS6T1bZN5isP9NDJOKC96Yl2PhhK1A5OpxpEQ5Oah4+IKThCrGW ymQ8ruPs3y8Qbz2MxZcO8mDVaf1zmN/seI6DjlLhgLUtViPquxPUwU6dwsdR+ipelEPq brvu9NPly8Jj22gdRfXGz1WF+Dkbq5Hyy3Q+cgTX0y9MYfsQk74zxyZcISWW4HhnSjhs TDag== 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 c17si3282121otr.109.2020.03.20.13.09.43; Fri, 20 Mar 2020 13:09:58 -0700 (PDT) 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 S1727060AbgCTUHu (ORCPT + 99 others); Fri, 20 Mar 2020 16:07:50 -0400 Received: from www62.your-server.de ([213.133.104.62]:39388 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726738AbgCTUHu (ORCPT ); Fri, 20 Mar 2020 16:07:50 -0400 Received: from sslproxy02.your-server.de ([78.47.166.47]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1jFNvm-0006X1-NO; Fri, 20 Mar 2020 21:07:46 +0100 Received: from [85.7.42.192] (helo=pc-9.home) by sslproxy02.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jFNvm-000BST-9W; Fri, 20 Mar 2020 21:07:46 +0100 Subject: Re: [PATCH] bpf: explicitly memset some bpf info structures declared on the stack To: Greg Kroah-Hartman Cc: Alexei Starovoitov , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Maciej_=c5=bbenczykowski?= , John Stultz , Alexander Potapenko , Alistair Delva References: <20200320094813.GA421650@kroah.com> <3bcf52da-0930-a27f-60f9-28a40e639949@iogearbox.net> <20200320154518.GA765793@kroah.com> <20200320161515.GA778529@kroah.com> <20200320162258.GA794295@kroah.com> From: Daniel Borkmann Message-ID: Date: Fri, 20 Mar 2020 21:07:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20200320162258.GA794295@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.2/25757/Fri Mar 20 14:13:59 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/20/20 5:22 PM, Greg Kroah-Hartman wrote: > Trying to initialize a structure with "= {};" will not always clean out > all padding locations in a structure. So be explicit and call memset to > initialize everything for a number of bpf information structures that > are then copied from userspace, sometimes from smaller memory locations > than the size of the structure. > > Reported-by: Daniel Borkmann Signed-off-by: Greg Kroah-Hartman Applied, thanks!