Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp359848ybl; Fri, 30 Aug 2019 00:33:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUY8KIlVNJMB2Stk9WQcnHjl8acQpP4VLIfKh8RbAqC48dF8vuJlNZ9VtOeT5M5XRXZU6/ X-Received: by 2002:a63:d002:: with SMTP id z2mr12210649pgf.364.1567150413605; Fri, 30 Aug 2019 00:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567150413; cv=none; d=google.com; s=arc-20160816; b=WJIOAb183sZF2MgLOxNcYFNcGiKs98cA9G/J5Zb5iHptydE7FlMlO82m4agLoZIlBx 9WVRXvaBectlBHS2ESkbEWBe5WnwxVsh/qoj6qpf8wDZC6qjIyBzdm1DFlvY10xNHL15 aVkWQnBYmJT+Z/SP47g1a5J6RHvbcz5X3mLoW9Gk70kJEupbZ9y1QMamlpVUqd/EjeMX AQIuW3UGWDowPol0G+LXjXFYGr+3Q16fNFNCCkx4V69ayH9e3CfzH3BwPU/0zpu8nKzc 1S52mYgQdeBIszagx7V5ge8hyNS1VHjacwqHSbHF/3d99HKCQHSBDKSRXhf8H2N2qQCK wfIg== 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=eoE2u8rOa2KjiEV1GajOBnRWMmINSIabWVKDU5PNgPg=; b=BVs1ULs523WPY5WJzlkp/DQyyIE3arTfQdmX/HlF7JAZCosSjWKIbikLYN2GtJnFnB mycXFEk2yiE4ClhVqtZFuqDqLgXJ2FiK2MGUP9pKW3G007dt/i7xSJo+ZYWiWyfD8agK Qoaqrr0vG8JFAE10Pk1nkceWYgVrhfJByi+ZnnyuB3TPQsR9OHT4yOt6TceDH3bnOVu9 hi8hS8KckbjZ8zqxz3Y1xQ4+57xAkDHKGNfPeUZlyAmFt01BLQjmRa5wB/LhxY+zJQUD fu9+G7COXYQ4ko+9/mJU7cFoKg3+gP2qlnB8KBQFo5252lKFIc72+h7rqe3yVRRCXvUv rM3g== 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 a19si4107837pgv.180.2019.08.30.00.33.18; Fri, 30 Aug 2019 00:33:33 -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 S1728240AbfH3Hb6 (ORCPT + 99 others); Fri, 30 Aug 2019 03:31:58 -0400 Received: from mail104.syd.optusnet.com.au ([211.29.132.246]:37836 "EHLO mail104.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726655AbfH3Hb6 (ORCPT ); Fri, 30 Aug 2019 03:31:58 -0400 Received: from dread.disaster.area (pa49-181-255-194.pa.nsw.optusnet.com.au [49.181.255.194]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 2E35B43ED1E; Fri, 30 Aug 2019 17:31:56 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92) (envelope-from ) id 1i3bNy-0004b9-FK; Fri, 30 Aug 2019 17:31:54 +1000 Date: Fri, 30 Aug 2019 17:31:54 +1000 From: Dave Chinner To: Austin Kim Cc: darrick.wong@oracle.com, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xfs: Initialize label array properly Message-ID: <20190830073154.GO1119@dread.disaster.area> References: <20190830053707.GA69101@LGEARND20B15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190830053707.GA69101@LGEARND20B15> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=D+Q3ErZj c=1 sm=1 tr=0 a=YO9NNpcXwc8z/SaoS+iAiA==:117 a=YO9NNpcXwc8z/SaoS+iAiA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=FmdZ9Uzk2mMA:10 a=7-415B0cAAAA:8 a=5bCHpZppJwO2KMCyn_0A:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 30, 2019 at 02:37:07PM +0900, Austin Kim wrote: > In case kernel stack variable is not initialized properly, > there is a risk of kernel information disclosure. > > So, initialize 'char label[]' array with null characters. Can you describe the information disclosure vector here? I can't see any, mostly because this is the "set label" function and that doesn't return anything to userspace. We also zero the on-disk label before we copy the user label into it, so I don't see that anything can leak onto disk, either... Cheers, Dave. -- Dave Chinner david@fromorbit.com