Message ID | 20221222181251.1345752-2-catalin.marinas@arm.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 422B7C001B2 for <linux-mm@archiver.kernel.org>; Thu, 22 Dec 2022 18:13:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B3B42940008; Thu, 22 Dec 2022 13:13:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A9CAA940007; Thu, 22 Dec 2022 13:13:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 98B56940008; Thu, 22 Dec 2022 13:13:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 89D15940007 for <linux-mm@kvack.org>; Thu, 22 Dec 2022 13:13:03 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 544141C5E06 for <linux-mm@kvack.org>; Thu, 22 Dec 2022 18:13:03 +0000 (UTC) X-FDA: 80270738646.10.A71282B Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf21.hostedemail.com (Postfix) with ESMTP id BE2711C000A for <linux-mm@kvack.org>; Thu, 22 Dec 2022 18:13:01 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf21.hostedemail.com: domain of cmarinas@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671732781; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oRF0gO8hWc+cc+2ZsbpqFBIBmWfD6OaXx5DZ9BsBZDQ=; b=AP1o1U2kDbiy/GlhGCuMJn7XczfdktynNJRn1WAMbgH2wHRhzC/DKBtnwAFxEJcS/QX7O8 5Pf6DbfiqtNQuQ0csK8ZCUE2c5XbXiRLazXqtN+PSQljecJj19MO4izGmP5rHXTcZQ82NH 627NUE711lSUOwIwlgPeTmHWlnyL1xg= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf21.hostedemail.com: domain of cmarinas@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671732781; a=rsa-sha256; cv=none; b=qgxtiWzZCV3AsjiTgjuhWAoV170jHcHeQTI0vGWmoGlSJD31AxXZ0ZUMtnXwwTEL6oNEKX oTVcNpV/3CQ9ml2cyIHnQI/6T7ogfxJcuD+JZiwztjkqjSpOr9QyeOuUwP2x6EMUBtxWiy siL80IFV9zE+WuKGPJwN1EsRSA/2xt0= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 14350B81F3A; Thu, 22 Dec 2022 18:12:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 320A0C433F0; Thu, 22 Dec 2022 18:12:56 +0000 (UTC) From: Catalin Marinas <catalin.marinas@arm.com> To: Will Deacon <will@kernel.org>, Seth Jenkins <sethjenkins@google.com> Cc: Eric Biederman <ebiederm@xmission.com>, Kees Cook <keescook@chromium.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org Subject: [PATCH 1/3] arm64: mte: Fix double-freeing of the temporary tag storage during coredump Date: Thu, 22 Dec 2022 18:12:49 +0000 Message-Id: <20221222181251.1345752-2-catalin.marinas@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221222181251.1345752-1-catalin.marinas@arm.com> References: <20221222181251.1345752-1-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: BE2711C000A X-Stat-Signature: kpf18s8xepnqreorbzudsogm1wgw6k64 X-HE-Tag: 1671732781-637061 X-HE-Meta: U2FsdGVkX18QtrDTEmsVlXm0kJuD8zG3pKTwIx9DPITIqkAg1Vzz4lsSeOPNDtvNA6YfIjMGSnQ+q0SeBtLgLWQ77vebELQAyFG8BspEj/vT0zcz74B2vUH8OQj7VRC6lSnGe1cP0ZLNDSf67ZUn5V9tkLlZT6bAPCREVHprwX62iggcLN3AJH4w3pncsAiI8L1g/6DqJYIgJKury35tamK6u8R3MIMJDqqUScctb8+kLpIOABebdhanxz4CbBRLuAqzS9wmCBw0la5vx4B04dwkzEArIrBpuekJKKBm69zRRfmLd4AEZv27P5cp60ATibpfl1aXbX7IJu+RwxX90+oW0jyS0atQvJVunRHqAfwM9JJAsbj/+w35yVrmn95TcbhD51kZe88RW2qC/0TW+ZhN8PhSqjX/GL0YMd7ERUXH3WDgIT9kPO7uf8lA+tMJ7+E/HqpPYIc79sGzQ+MdKcmoAAuF765rAm0w56DVUzGB91SCw1KdEbMKsA29o41D+HX/eRgXGHscp39UcTUX+VQDsKzMUfQvCSjhHs/1CAewA1GfLdJSCtFkDxZ9frCWF4d8wBZHOVoD21ZJLTmRO0qeqL6v/nhtTeCtktOaC/SC3w5fu9iJs43OIGdT3o4g2bpd8picBEBiOIym4hMpnqe1/FKaICbXe9a6tvcFDAon+ZFf+73IKu1/p23BapzQ9bGV+j/4EYGNxMVaAps4gEbMPi71vNwXTRzmF5ZK1KQpgnRxNqJF/eGQ1FigftUNcZaFGBZRE9Im5IGSE1uvoan37AXV/nVr34dd0WOFwt0I6O2RO1Cem6kcHtDsOG5qSLxQUWW0prY+nTw8kcBypxwKQXhWaqPXfG3JRDjmVQdx13WXswn7pkYhj74HEZ9JIZCLvM9Wkr0GMTZVRcyPaRqwwUO8653eAq19yy5K6D1c7MDKoTBEl2+lffMaFUq43B78yJr8raFfYduxuy4 +Vz5z2Xy uFefs2zfwxlKuSKuMsWh4qVRfp6XkhM0hZ8kqlLJO6eZMUJpsCPY8aRHQD+QwT78GuhtDNkrizHTksxwJaaBhAtUab8BZuuijvhbr/Rug5FG99FDcmnLgl2IeWqtmjsOCGLsjtueEMIGC9CAtVF2163ynSUW+e87gaQ7gDLXeotdxV3hEVL9PGHPHMVgHdj9nADvG X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
arm64: mte: Coredump fixes
|
expand
|
diff --git a/arch/arm64/kernel/elfcore.c b/arch/arm64/kernel/elfcore.c index 27ef7ad3ffd2..4e3f84799669 100644 --- a/arch/arm64/kernel/elfcore.c +++ b/arch/arm64/kernel/elfcore.c @@ -65,7 +65,6 @@ static int mte_dump_tag_range(struct coredump_params *cprm, mte_save_page_tags(page_address(page), tags); put_page(page); if (!dump_emit(cprm, tags, MTE_PAGE_TAG_STORAGE)) { - mte_free_tag_storage(tags); ret = 0; break; }
Commit 16decce22efa ("arm64: mte: Fix the stack frame size warning in mte_dump_tag_range()") moved the temporary tag storage array from the stack to slab but it also introduced an error in double freeing this object. Remove the in-loop freeing. Fixes: 16decce22efa ("arm64: mte: Fix the stack frame size warning in mte_dump_tag_range()") Cc: <stable@vger.kernel.org> # 5.18.x Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reported-by: Seth Jenkins <sethjenkins@google.com> Cc: Will Deacon <will@kernel.org> --- arch/arm64/kernel/elfcore.c | 1 - 1 file changed, 1 deletion(-)