Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3875180ybi; Fri, 19 Jul 2019 10:32:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaBsmMmR7uqqu6SjDXRTSjgFWVzWfIpSZ4bAVQ8C+A1i+2kni7Q1hfOpb33VDZWkN8eEOf X-Received: by 2002:a17:902:b949:: with SMTP id h9mr53846659pls.120.1563557576605; Fri, 19 Jul 2019 10:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563557576; cv=none; d=google.com; s=arc-20160816; b=qSbQhISLxQ91Q/oj6Dtj1ObIr0qJRwL9WDOaWO8IeqiYjMkqi8WEnGlyVE65MuB/KW I+F37BbStLr3/gqqOVOeBxZkJKEyHea4UTAJtfKH32HJhKYs3+jtO2MH3S3VAZCRDVzN MjHpTx8197+D+nymxqqtd4m/tZzwOnOPUyWJJG54JEvcsT7Ruj0L4TixaFhbzIMKLQty FIIg1YwvOkkThKWuDn2Vr6ZgS/c1PQHdVb2H0MKTncoWNTtT83dwlitnh2NmXE90AoUA NOpe6e5U4LqvGPc5pXfEgty3Zs2Sn6l45LH5JNe4QqxDF48vVEtpZQiLDk/dzQQ8AqxL kLkQ== 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=6wpj7D2xweRngilEArffpveazHRs0YcmOxbmAOyMyTg=; b=Bn4CiDe0wSmOfJ4/cxo+XIMMAU6XDbY6OrpjdNmbgGryJl1P70yCy3g+LgA+gIZuOv FhWIfkSZX8Rro1eAOzOjIUl2LlBernS/QtnC1vepT7Of/hA/raSK7kxtAMaQ2jwIiYIg 9XHK2XFmCeXHIhoq/DM98ewF2fyixkf2JVaVMLh74EAwdCMNJ4Yyv/0S250yUBGWzkiY vEQZcxqlfLqpav58pB2BLy8ujPsXGYeQwzkIf0L8dS9SidiWuPgZvfjXx0FW1VqQw0JJ yAbA6TundDamhNpFWO8pxKFMAD7/Ug8LM+KRcVpwsBPO6nHNzqqPFgMtTwAQIOwwNeeb Ke7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JkMss7z2; 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 29si2318287pgk.306.2019.07.19.10.32.41; Fri, 19 Jul 2019 10:32:56 -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=JkMss7z2; 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 S1729984AbfGSRCQ (ORCPT + 99 others); Fri, 19 Jul 2019 13:02:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:58178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728476AbfGSRCP (ORCPT ); Fri, 19 Jul 2019 13:02:15 -0400 Received: from localhost (unknown [84.241.199.95]) (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 C1A262184E; Fri, 19 Jul 2019 17:02:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563555735; bh=gaugX9ZhIKdDiADtQa4ubEUvcd0E44zHZspxew0b+eQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JkMss7z2IaCuUsVxputAzUIM2ymm12lW7m08ofokuK+NdePzrko3aERRnpx/Lo+Ly z2eOvX9EzbP6flCTJKaIFurLcBwbhTeqFDpXZYYmiLuRg0vxT90A7W7iJmZxDHkP0N 2jo7BBtF5tAraPoai88w9WzyprAZ/Luf7LMVxCho= Date: Fri, 19 Jul 2019 19:03:31 +0900 From: Greg Kroah-Hartman To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Gen Zhang , Kees Cook Subject: Re: [PATCH AUTOSEL 5.2 014/171] consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c Message-ID: <20190719100331.GA11778@kroah.com> References: <20190719035643.14300-1-sashal@kernel.org> <20190719035643.14300-14-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190719035643.14300-14-sashal@kernel.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 Thu, Jul 18, 2019 at 11:54:05PM -0400, Sasha Levin wrote: > From: Gen Zhang > > [ Upstream commit 84ecc2f6eb1cb12e6d44818f94fa49b50f06e6ac ] > > In function con_insert_unipair(), when allocation for p2 and p1[n] > fails, ENOMEM is returned, but previously allocated p1 is not freed, > remains as leaking memory. Thus we should free p1 as well when this > allocation fails. > > Signed-off-by: Gen Zhang > Reviewed-by: Kees Cook > Signed-off-by: Greg Kroah-Hartman > Signed-off-by: Sasha Levin > --- > drivers/tty/vt/consolemap.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) No, please do not take this patch, it was reverted in commit 15b3cd8ef46a ("Revert "consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c"") because it was broken. Please drop from all of the autosel queues. thanks, greg k-h