From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marion & Christophe JAILLET Date: Thu, 29 Oct 2015 06:12:01 +0000 Subject: Re: [tpmdd-devel] [PATCH] TPM: Avoid reference to potentially freed memory Message-Id: <5631B8B1.9020000@wanadoo.fr> List-Id: References: <1445545961-5620-1-git-send-email-christophe.jaillet@wanadoo.fr> <20151023073733.GA6941@intel.com> <20151027102723.GA9120@intel.com> In-Reply-To: <20151027102723.GA9120@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Jarkko Sakkinen Cc: kernel-janitors@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Le 27/10/2015 11:27, Jarkko Sakkinen a =E9crit : > On Fri, Oct 23, 2015 at 10:37:33AM +0300, Jarkko Sakkinen wrote: >> On Thu, Oct 22, 2015 at 10:32:41PM +0200, Christophe JAILLET wrote: >>> Reference to the 'np' node is dropped before dereferencing the 'sizep' = and >>> 'basep' pointers, which could by then point to junk if the node has been >>> freed. >>> >>> Refactor code to call 'of_node_pup' later. >>> >>> Signed-off-by: Christophe JAILLET >> LGTM. > Is there anyone able to provide Tested-by for this? > > Christophe, were you able to reproduce the crash (insmod/rmmod couple > of times maybe?) and validate that it was gone after fixing the bug? Hi, no, I never triggered the bug. This is just something noticed while looking at potential issues related=20 to incorrect use of 'of_node_pup'. I only compile tested the patch. Best regards, CJ > >> Reviewed-by: Jarkko Sakkinen > /Jarkko > -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755486AbbJ2GMJ (ORCPT ); Thu, 29 Oct 2015 02:12:09 -0400 Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:42468 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751025AbbJ2GMH (ORCPT ); Thu, 29 Oct 2015 02:12:07 -0400 X-ME-Helo: [127.0.0.1] X-ME-Date: Thu, 29 Oct 2015 07:12:04 +0100 X-ME-IP: 92.140.232.207 Subject: Re: [tpmdd-devel] [PATCH] TPM: Avoid reference to potentially freed memory To: Jarkko Sakkinen References: <1445545961-5620-1-git-send-email-christophe.jaillet@wanadoo.fr> <20151023073733.GA6941@intel.com> <20151027102723.GA9120@intel.com> Cc: kernel-janitors@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org From: Marion & Christophe JAILLET Message-ID: <5631B8B1.9020000@wanadoo.fr> Date: Thu, 29 Oct 2015 07:12:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151027102723.GA9120@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 151028-1, 28/10/2015), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 27/10/2015 11:27, Jarkko Sakkinen a écrit : > On Fri, Oct 23, 2015 at 10:37:33AM +0300, Jarkko Sakkinen wrote: >> On Thu, Oct 22, 2015 at 10:32:41PM +0200, Christophe JAILLET wrote: >>> Reference to the 'np' node is dropped before dereferencing the 'sizep' and >>> 'basep' pointers, which could by then point to junk if the node has been >>> freed. >>> >>> Refactor code to call 'of_node_pup' later. >>> >>> Signed-off-by: Christophe JAILLET >> LGTM. > Is there anyone able to provide Tested-by for this? > > Christophe, were you able to reproduce the crash (insmod/rmmod couple > of times maybe?) and validate that it was gone after fixing the bug? Hi, no, I never triggered the bug. This is just something noticed while looking at potential issues related to incorrect use of 'of_node_pup'. I only compile tested the patch. Best regards, CJ > >> Reviewed-by: Jarkko Sakkinen > /Jarkko >