Received: by 2002:a05:6520:2f93:b029:af:d4db:7a05 with SMTP id 19csp2371116lkf; Fri, 5 Feb 2021 11:22:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJw094E9Vm5/t1ny/RY/Z0H2HCENiCtTfcF+LCwuDl8UDYeFG9C8DusVYJDCM+BcVO3yOLLw X-Received: by 2002:a17:907:f81:: with SMTP id kb1mr5422994ejc.466.1612552945126; Fri, 05 Feb 2021 11:22:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612552945; cv=none; d=google.com; s=arc-20160816; b=mCC4+j3bY83wFUxFXnYwneEg5YsoUICtPAwM0xI4XuMLWJdUpSoS7sNPnOWGZjsOM6 oXuyVACcHmrn/OKKZTW9gW1P0gy84FTPlihegVGBJLSTbwBAuEkrEdn7ZmLLABSx18aq HB7Bl0H3TyCRP//0aSf/gG0fhheb+CaxzRgC8DsF+DAlpOOqMUp7/uIrv0jmq4TsE9b8 edMvfiCVlNDBsEq0Vh248ssiFam1tdEptHysOCskp4S3XULDdHtaSeTGXlLpFwzV6Mw3 Al8cpGlneF7wiwuV9K7+uQ17wyg//U+wg3fII4kwV/YkQfkq070bWYVTIjyCW+AlNXI5 DsLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=HhOAZD2n7Y5nUjPEAl7h3S686KemCI0DTcFZcZkv6EE=; b=krXNJEtNRwSluVlVIETd/emXZp0cZ7617w1VBFcpoBs6xUWJSkJ+n6HpeXkpaaeWqI drlm3ZfrYWuB0PtzzsyqLvXW+BOeOexO4rQPVWu5vwmBkvErA/7B+FM41IcHkCkyPeZO b2bbWus4MQh16TLj+Ht3cOL9BXjKdLaity7GpFgKqfeompuYJrjmPtIAYy7T6oDataCe UilKw377/JrBH5RidQ0Tw9brkIMZTNoYdmA8VLYB1CoHdpfQ4CSXCfyx/vHW+ezkd9mo QyD89Io/qiPA7wvIkX3rOwbckhHr/kwTjXO718Zx0pv08RjjwdCppK4kg9x+SBkL4XF2 SbDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=pPLebMnD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si1423384edc.323.2021.02.05.11.22.00; Fri, 05 Feb 2021 11:22:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=pPLebMnD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233548AbhBERiA (ORCPT + 99 others); Fri, 5 Feb 2021 12:38:00 -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-kernel@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