Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2233949imm; Thu, 18 Oct 2018 11:07:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV62A2PvCq4dAXj/Oc55BxJWUlV9x2kjxHkerIPhO1qG89dYkClhsrQ/DmFKLsWZWAthmCMLx X-Received: by 2002:a17:902:d704:: with SMTP id w4-v6mr31411293ply.230.1539886056236; Thu, 18 Oct 2018 11:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539886056; cv=none; d=google.com; s=arc-20160816; b=LEhhl2AaxqKAvydGMi26V/3a3HlylZznjHJ9wvJvhMDiEpb3l0lZn5T5cdenwZQQ20 LTtCwW/UEz8mQJ0SA7lDi+EwHAmZVgw2ft9VU0HwQIzp2FGo3OjGx5PZ3hShaNI4SurK 6vDkASfu73eO+5xBmpMVBGXiAol/9xWpqDJAkgkhEMn9pSXDqClJTH3/FGdGpdZUqN2y 7ftU541pP6HCPBsbQYMSIle56Hdt7MW6rE5F5FsxSzLEClARJH2j+cM7awrcy256y8Aq D1/DHl3L1jWEm2BHhhMRZT9einZbOLskdjI6VphFREXnvOyc1exAUhQ9FX4UOMgsYoKA KmJQ== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ioEblrhgG/LbyVtxdZBSQ8Fz1Rojo9YZB2XQkS+CtFw=; b=Ql5hNHViMYqSky1qvihh+iDqsOcAvjaJNOcRYsr5drw0QToRaD7wUISmdDE1075+hK 671yLzBFOB5x3fN1vl373bElwJhev4lv1R8Vi78uvaUhmiT2kKa6BVrNGOyoHLxiXrHD NxfnJV2Ye6gsDzBYlM3h4uVw6ZP+5Y94k5OfNAR5/o/qkCgjOlosC55uUlcs7e9E4i6c dax82gjtcl3PFCgLrUVMk8vr+K5IgsNsUWSiU+o454fy7DF3TZDpcUmNJPq+MW+kEblH K9nRemj51NafZ6gMOUoEBxk0PKrwdwPFSoI4p8CGRlNWefOJfVukhiP+t8oiAgAsIIK1 jing== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZwtwPfEu; 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 z75-v6si22758942pfd.259.2018.10.18.11.07.20; Thu, 18 Oct 2018 11:07:36 -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=@kernel.org header.s=default header.b=ZwtwPfEu; 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 S1730166AbeJSCHA (ORCPT + 99 others); Thu, 18 Oct 2018 22:07:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:55480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726516AbeJSCHA (ORCPT ); Thu, 18 Oct 2018 22:07:00 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1FD1D21480; Thu, 18 Oct 2018 18:04:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885893; bh=AXZ7Lm6pkKWuvJ7n2sL5j2u96ZnKYxuRF9KYaIRtYww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZwtwPfEurJ0h9kmcCNn8YZVRprtBpWp2t/y48tkjPvTK3uMp0e8DO+rXVNUd3bXi3 F63kbthN2/KyU8gN70GlpDHWiYkufN3fkpZ5v9q1qyfJNNM1A6tN0vMnPpbGEHeZIB 6R+aw65Ng1BiFk2ruGmAqa9FUcNHNfNSBnVCyV70= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jann Horn , Kees Cook , Andrew Morton , Michal Hocko , Roman Gushchin , Davidlohr Bueso , Oleg Nesterov , Christoph Lameter , Kemi Wang , Andy Lutomirski , Ingo Molnar Subject: [PATCH 4.4 11/48] mm/vmstat.c: fix outdated vmstat_text Date: Thu, 18 Oct 2018 19:54:46 +0200 Message-Id: <20181018175428.590247375@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175427.133690306@linuxfoundation.org> References: <20181018175427.133690306@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jann Horn commit 28e2c4bb99aa40f9d5f07ac130cbc4da0ea93079 upstream. 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely") removed the VMACACHE_FULL_FLUSHES statistics, but didn't remove the corresponding entry in vmstat_text. This causes an out-of-bounds access in vmstat_show(). Luckily this only affects kernels with CONFIG_DEBUG_VM_VMACACHE=y, which is probably very rare. Link: http://lkml.kernel.org/r/20181001143138.95119-1-jannh@google.com Fixes: 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely") Signed-off-by: Jann Horn Reviewed-by: Kees Cook Reviewed-by: Andrew Morton Acked-by: Michal Hocko Acked-by: Roman Gushchin Cc: Davidlohr Bueso Cc: Oleg Nesterov Cc: Christoph Lameter Cc: Kemi Wang Cc: Andy Lutomirski Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- mm/vmstat.c | 1 - 1 file changed, 1 deletion(-) --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -869,7 +869,6 @@ const char * const vmstat_text[] = { #ifdef CONFIG_DEBUG_VM_VMACACHE "vmacache_find_calls", "vmacache_find_hits", - "vmacache_full_flushes", #endif #endif /* CONFIG_VM_EVENTS_COUNTERS */ };