From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-25.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E876BC433DB for ; Fri, 5 Feb 2021 19:21:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C8C964E40 for ; Fri, 5 Feb 2021 19:21:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233412AbhBERhu (ORCPT ); Fri, 5 Feb 2021 12:37:50 -0500 Received: from linux.microsoft.com ([13.77.154.182]:57852 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233373AbhBEP5d (ORCPT ); Fri, 5 Feb 2021 10:57:33 -0500 Received: from [192.168.0.104] (c-73-42-176-67.hsd1.wa.comcast.net [73.42.176.67]) by linux.microsoft.com (Postfix) with ESMTPSA id 72E6C20B6C40; Fri, 5 Feb 2021 09:39:15 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 72E6C20B6C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1612546755; bh=HhOAZD2n7Y5nUjPEAl7h3S686KemCI0DTcFZcZkv6EE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=pPLebMnDJH4+oF4Wosz3wKn0HGUpcCKpETnQ1382bqaeKGAtD2BOGcDKevTLA55e1 OsELd4GAKcCiA8pcT8fsjjgjrB1yeYfQGMhblNCu/1Du7oGfzkI/SrvdaYJ40LueW4 55pH9N2No/AMCipLzCvfMU/IaRxxL8Mlth5qxzbU= Subject: Re: [PATCH v2 1/2] ima: Free IMA measurement buffer on error To: Greg KH Cc: zohar@linux.ibm.com, bauerman@linux.ibm.com, dmitry.kasatkin@gmail.com, ebiederm@xmission.com, sashal@kernel.org, tyhicks@linux.microsoft.com, linux-integrity@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20210204174951.25771-1-nramas@linux.microsoft.com> From: Lakshmi Ramasubramanian Message-ID: <7000d128-272e-3654-8480-e46bf7dfad74@linux.microsoft.com> Date: Fri, 5 Feb 2021 09:39:14 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On 2/5/21 2:05 AM, Greg KH wrote: > On Thu, Feb 04, 2021 at 09:49:50AM -0800, Lakshmi Ramasubramanian wrote: >> IMA allocates kernel virtual memory to carry forward the measurement >> list, from the current kernel to the next kernel on kexec system call, >> in ima_add_kexec_buffer() function. In error code paths this memory >> is not freed resulting in memory leak. >> >> Free the memory allocated for the IMA measurement list in >> the error code paths in ima_add_kexec_buffer() function. >> >> Signed-off-by: Lakshmi Ramasubramanian >> Suggested-by: Tyler Hicks >> Fixes: 7b8589cc29e7 ("ima: on soft reboot, save the measurement list") >> --- >> security/integrity/ima/ima_kexec.c | 1 + >> 1 file changed, 1 insertion(+) > > > > This is not the correct way to submit patches for inclusion in the > stable kernel tree. Please read: > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > for how to do this properly. > > > Thanks for the info Greg. I will re-submit the two patches in the proper format. -lakshmi