Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp258986ybl; Thu, 29 Aug 2019 22:38:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwd9fSSYLo8HpdkFHF17iiU2jrk7hcAjfWvxafu9qA0upRzqw1zZKpP0L1YoLt0UH2TETEA X-Received: by 2002:a63:cc14:: with SMTP id x20mr11773527pgf.142.1567143498895; Thu, 29 Aug 2019 22:38:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567143498; cv=none; d=google.com; s=arc-20160816; b=MuT6bslp5y0FrbAPA53EhwcrmxhmYoAVXg8YjsP6jImTta9oBYiMktaH+xkqBDJfXO uK1xwlBsLgV2v5K1RY01yeT1kTjeeA61RLm05+LGK3aB9YS6h/360kXpV/t+o2p07hn6 Z19TuUNsd8DS48gsVQUQk9LQC7ahFMXQ0Prb+ZAeogXQnUCM2iVuV+iELRwpS5X7kqUF +KAWv4FN5P9EPrKekwOa2cNIXblOORRIm2jzZWYJJO0xF37ptKJ0r4CQ8NdLTfJeD+c1 uRSfUapMXzH5sypqRBon5prR5jHmS6sdUt4oOxi4zZ762yhZ5Xjr8IfESVv+wizSzibh DxMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=w7YEtGvCAOlZwrqQsoF3/LXuqZDGNstU9nE89n8+OrQ=; b=Hq3QRGUWzqdoceTqaYckpS1Y7CDujcjhBL70nNEb7eBipCuuz0A03ZfdEVdG8Agt8A 75ZRcn9TXjL8KTmC/GLia7d6lL11/esAKnjp0ZE3+7BUWofNF2AhDnZ+Ypp/Qq3/Lm7J H1KNijmtA4VTeex0qYQRUqBmgSi4Ff8MSLluSSg4BWVHvWewtdcE88VlgCXvRPo853tV afEyPU6777g9ilpPUoZhQq8eDiZAbyrd8B39A9sfrzv3afs2VB2YiXP5z7Ds1vRYtW6J ceZQFlq0sxxnyGFR1hH05m1/9jward1HJecUw6ya4rkUPM3Hsa6NN2C0rXb/VK8HNm+M 9EMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="OoqvZ/vU"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16si3949936pjn.71.2019.08.29.22.38.02; Thu, 29 Aug 2019 22:38:18 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="OoqvZ/vU"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727635AbfH3FhN (ORCPT + 99 others); Fri, 30 Aug 2019 01:37:13 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39345 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbfH3FhM (ORCPT ); Fri, 30 Aug 2019 01:37:12 -0400 Received: by mail-pg1-f196.google.com with SMTP id u17so2935699pgi.6; Thu, 29 Aug 2019 22:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=w7YEtGvCAOlZwrqQsoF3/LXuqZDGNstU9nE89n8+OrQ=; b=OoqvZ/vUxFI6labySN8wIMZm111YgA8EMKBCc/9d+kIVWKKSin8fyuSZnHLsWgLCew ucpeOlhTMWY/3XccH57aPaaRSUs/diAwe3Uq5tnKvbXz2YWI2XLJwYvjHYugLOL7dcJ5 z2S2kVX3VITtcrRpOpGi7VBGg9/ni0MaTzvjHq+s4BVlghaZ42k7q2+v37oDlSj4vbgn ELIwuPI2Dy1pDMHiFEAUPGdDyX/KmZnFi5sAW3sW7ndbb1BTdrN9BEvy4VG/8Enz7sQt IqrOIk/goJQAIVCLOZ3JvQPylCAWWLjCOp2sOFDSS2+2yKrNw8WynGCl7eXDBZ+KDT18 LeeQ== 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:mime-version :content-disposition:user-agent; bh=w7YEtGvCAOlZwrqQsoF3/LXuqZDGNstU9nE89n8+OrQ=; b=VGFdsB8gFfBgrJwy7o1Hyj0R61tKsgN39mXGBwru/oG/VQMJvhVP+XRFl89P1LoHI+ 4btrbvq9+4WlH1Rb3QaLk601RWrY3AUn9/lnEzliz5sEQ+FJaqll/LsL0IWVqHONXLkn KwVrHn/tXe+XXuMBRnMlXNhffUO8AnimVKu19dmr9IlJZ80WG0AC1sCYxGxpl/e6XkOn d0Ix419XvfeKEsIqG4IDBaogKkK4UM7d6IZByCFuN+9+Wwbe0+ObvJMeDdR46GxW4iCL MkL+GTZGMAv+RFLgQLqi+TCOI5QUyhkJF0LTnMwjXTVF6YqqTim3CIjr3AUaUV5HCBmv NXcg== X-Gm-Message-State: APjAAAVRVTP7urfnZui2N33YdkwMgc8kaE8mR4csu+GdZI4eDe8GyrmR 6z2FdRqC4hzDsgZDKM+KTiZhalk90X8= X-Received: by 2002:a62:8344:: with SMTP id h65mr16090697pfe.85.1567143431949; Thu, 29 Aug 2019 22:37:11 -0700 (PDT) Received: from LGEARND20B15 ([27.122.242.75]) by smtp.gmail.com with ESMTPSA id e129sm11854174pfa.92.2019.08.29.22.37.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Aug 2019 22:37:11 -0700 (PDT) Date: Fri, 30 Aug 2019 14:37:07 +0900 From: Austin Kim To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, austindh.kim@gmail.com Subject: [PATCH] xfs: Initialize label array properly Message-ID: <20190830053707.GA69101@LGEARND20B15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Austin Kim --- fs/xfs/xfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 9ea5166..09b3bee 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -2037,7 +2037,7 @@ xfs_ioc_setlabel( char __user *newlabel) { struct xfs_sb *sbp = &mp->m_sb; - char label[XFSLABEL_MAX + 1]; + char label[XFSLABEL_MAX + 1] = {0}; size_t len; int error; -- 2.6.2