Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5450034imm; Tue, 16 Oct 2018 10:23:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV604G2DxKJNRo6ED2uQK9dMy7ljRTolzg473p3u0kXYmD+BqiE1A2oVDt2stQddPjNZS2+Wr X-Received: by 2002:a17:902:4103:: with SMTP id e3-v6mr22240316pld.236.1539710626187; Tue, 16 Oct 2018 10:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539710626; cv=none; d=google.com; s=arc-20160816; b=wRUQWEXq7YNXIqR++6oGf7T/mzxAI1lU2H3eoMtENsXC1EM6V1iLuJZluaUjCKIfVU p8+3RLASKno2/dGpyqPsuRgA3oBiq7NnRF2EUDbpQQTnCp5Wm1rHEMGeX1Ne1Rtl8PqZ prrAzvM71rA96Zc3Dd7Qj59WLEuqJhJG01Ty5JOTgEU8tSrJB/LrunzKH9sF/xyBz0C8 nplHvO6b/MkdUbmiwAzWBxlKOJ2Gz7RyTS2QhSemEYP3ie53/67gp8jW7HgasZoL22Dj NlqokwC077LpYvDzgnju9n5whwGU3FrAAoNGPOrU/KSSQpQzMX067IqNIkQLRJ3m3HWC pclQ== 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=T8n++L9XMSjmar2xASSZi2+wNK++VzMAYGRYSfK0xEw=; b=sXoKNw8j4ZdlIfTgCKRvL2MsIUtV2f8emTh57TxFHwfDzxOPUuXKgrRVmR6dsE+F7v fpY5EZoqHgROUblt+RXGI5vc7Wbr8RmUMEWX8lL2/87RdDX4rpecbJBE+9gSTnTCfsoW jdr2W8toBEwReXCSlzo37t92dkqkEWzxpq3C0TGnUC2s7OfNIJTT7Hi6zZ5IEYh0pEPh CxzFtee6C33hRrUf7T9CtelDo0tBq+9K7m2OhjT6ysytmP4+6XerXHwJqfQkwdCzvJ3w kNzMw8pTwuX10aYi/pKz86ZDOwOdffqnrtw5n0NLG2DBcqOqSPZJGEqvUThl0JSPJINA JZ8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nM4Y2av1; 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 a90-v6si9271091plc.88.2018.10.16.10.23.30; Tue, 16 Oct 2018 10:23:46 -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=nM4Y2av1; 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 S1731266AbeJQBOY (ORCPT + 99 others); Tue, 16 Oct 2018 21:14:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:60950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730635AbeJQBOX (ORCPT ); Tue, 16 Oct 2018 21:14:23 -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 41C9620658; Tue, 16 Oct 2018 17:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539710578; bh=c0SdQ1kXtaoCN1czBd7Qdf8yP0HHMu9vO0lfPK3KQpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nM4Y2av1XbF8Mh32sWd+sk17is8vFwTofxhZ5gtbQD75Mwxw0ek77A8ZBWYQqqTr9 ou7jgpBfOVnucrUN6BTrYz8TDOIxX0EUeMJvnoOTO8Gdkp4yvSFPcw/hWriHfLvryb ys34RDkntiqZPjsulCXhBXq/4OAAjvYtzva5M9as= 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.9 15/71] mm/vmstat.c: fix outdated vmstat_text Date: Tue, 16 Oct 2018 19:09:12 +0200 Message-Id: <20181016170540.160160468@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016170539.315587743@linuxfoundation.org> References: <20181016170539.315587743@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.9-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 @@ -1089,7 +1089,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 */ };