From patchwork Tue May 10 14:40:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 67456 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2165870qge; Tue, 10 May 2016 07:40:50 -0700 (PDT) X-Received: by 10.98.42.196 with SMTP id q187mr40457217pfq.140.1462891250056; Tue, 10 May 2016 07:40:50 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hw13si3135152pab.223.2016.05.10.07.40.49; Tue, 10 May 2016 07:40:50 -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 S1752906AbcEJOkk (ORCPT + 29 others); Tue, 10 May 2016 10:40:40 -0400 Received: from foss.arm.com ([217.140.101.70]:45620 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751502AbcEJOkj (ORCPT ); Tue, 10 May 2016 10:40:39 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D53963C; Tue, 10 May 2016 07:40:49 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.215.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C12AE3F252; Tue, 10 May 2016 07:40:36 -0700 (PDT) From: Julien Grall To: linux-arm-kernel@lists.infradead.org Cc: will.deacon@arm.com, linux-kernel@vger.kernel.org, julien.grall@arm.com, catalin.marinas@arm.com, stable@vger.kernel.org, Mark Rutland , "Suzuki K. Poulose" Subject: [PATCH] arm64: cpuinfo: Missing NULL terminator in compat_hwcap_str Date: Tue, 10 May 2016 15:40:31 +0100 Message-Id: <1462891231-17605-1-git-send-email-julien.grall@arm.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The loop that browses the array compat_hwcap_str will stop when a NULL is encountered, however NULL is missing at the end of array. This will result to overrun until one NULL is found somewhere in the memory. Fixes: 44b82b7700d0 "arm64: Fix up /proc/cpuinfo" Signed-off-by: Julien Grall Cc: stable@vger.kernel.org --- Cc: Mark Rutland Cc: Suzuki K. Poulose --- arch/arm64/kernel/cpuinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index 84c8684..f0c3fb7 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -87,7 +87,8 @@ static const char *const compat_hwcap_str[] = { "idivt", "vfpd32", "lpae", - "evtstrm" + "evtstrm", + NULL }; static const char *const compat_hwcap2_str[] = {