Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5828091ybi; Wed, 31 Jul 2019 04:02:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQH3A7POA7QT6rJ8MzIBRw7tsSi3qVh+xSLB/uIV+OZHSCJOjCm6H5wfNGqcEpvodmqdID X-Received: by 2002:a17:902:f216:: with SMTP id gn22mr117101435plb.118.1564570978945; Wed, 31 Jul 2019 04:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564570978; cv=none; d=google.com; s=arc-20160816; b=LQ5jE938S6w5A5oKaaFCbsM1SjaBpM8REJe8GvYSArFjnq/Oc9uUqjS3e6eV8C7RIK DPdfCVC+jv1W2yphvsO/cx2fQvKpxmxNjcmT09NNn9UByiob9nK7NltNwAS6KwHqpyZy g0SXcqPZlIh7Mk/LPbqIjj7H7xp5iAF2Pt92CqEigyaiSOv7/grVIaSw9q2RAb1i0fzb E175GUDBNbGTbw/yU5aVa0pYX8A9gh7GOQyUdW30HZkdYMEvhbJdASvvNkCmocyWoELy fOmjo3jYVWp+zfq9830el3HlOZOuH0tXIJW5Q5BqrHCQMgj7deX8NJy2gD+Wk2TM4olP xbdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dhX9XLWi6gk+k86sfOCXTEP40l8SxMAoWkjItbrWZr8=; b=Wrhs1C+4fDxJnvmartrVMWsyhBUvZU0YffEDZsLzmhA+uuc0DHMIhMG4qJ90cgleNR pjjjr5ch3g2AqD03Zfo0WT2K7v/n54AXlYnMaj93zjqCEvHLMR5sPy26abbOg9QIhtAg ySD84NW9+R1j8R04L48JKYcZltyoD2zj4wDKjg1eLYA1SwdA8FfSfLWDFIXlPr2EGhdM GRuJJF1U1Yoq6m1LOOf1wTyd+vW3n+Kosamb181oAOqZBE3F2HjSSQkQLhQZb89NH+O/ kQ8CbegYyRARl6oPOsd3rqpBO1VQYfgi3SDS77Y5rqd2SElN8AnlfodSsTwTfN6hlST5 eI2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sb9wX3kh; 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 126si34505041pgb.47.2019.07.31.04.02.44; Wed, 31 Jul 2019 04:02:58 -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=sb9wX3kh; 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 S1727978AbfGaJol (ORCPT + 99 others); Wed, 31 Jul 2019 05:44:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:38214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbfGaJol (ORCPT ); Wed, 31 Jul 2019 05:44:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 950EC20665; Wed, 31 Jul 2019 09:44:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564566280; bh=9CQh+fppQvTOStqKiDukaYM+WtmIth11V+qgBeMjt+A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sb9wX3khpHjNdMDeSXgabrCnsVy1VQdsirBRGsSkZefxPDFxwgFvayNvYQ7LDrlc8 VGzqK1UvFOOC+oQsLd80o1+z7HDCc22ryiDnx9I5biBBtaob69W2fz0tIGMHrYIDYn HkIfyE4+xpuCgC6CsveV9sbGGQSfxxLWZUR/lnPc= Date: Wed, 31 Jul 2019 11:44:37 +0200 From: Greg KH To: Amit Pundir Cc: Stable , Wen Yang , "David S. Miller" , Thomas Gleixner , Allison Randal , Armijn Hemel , Julia Lawall , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Herbert Xu Subject: Re: [PATCH for-4.14.y 3/3] crypto: crypto4xx - fix a potential double free in ppc4xx_trng_probe Message-ID: <20190731094437.GF18269@kroah.com> References: <1564517913-17164-1-git-send-email-amit.pundir@linaro.org> <1564517913-17164-3-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1564517913-17164-3-git-send-email-amit.pundir@linaro.org> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 31, 2019 at 01:48:33AM +0530, Amit Pundir wrote: > From: Wen Yang > > commit 95566aa75cd6b3b404502c06f66956b5481194b3 upstream. > > There is a possible double free issue in ppc4xx_trng_probe(): > > 85: dev->trng_base = of_iomap(trng, 0); > 86: of_node_put(trng); ---> released here > 87: if (!dev->trng_base) > 88: goto err_out; > ... > 110: ierr_out: > 111: of_node_put(trng); ---> double released here > ... > > This issue was detected by using the Coccinelle software. > We fix it by removing the unnecessary of_node_put(). > > Fixes: 5343e674f32f ("crypto4xx: integrate ppc4xx-rng into crypto4xx") > Signed-off-by: Wen Yang > Cc: > Cc: "David S. Miller" > Cc: Thomas Gleixner > Cc: Greg Kroah-Hartman > Cc: Allison Randal > Cc: Armijn Hemel > Cc: Julia Lawall > Cc: linux-crypto@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Acked-by: Julia Lawall > Signed-off-by: Herbert Xu > Signed-off-by: Amit Pundir > --- > Cleanly apply on 4.9.y as well. This is already in the 4.14.135 kernel release. Are you sure we need it there again? thanks, greg k-h