Received: by 10.213.65.68 with SMTP id h4csp664660imn; Fri, 6 Apr 2018 07:00:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/K6+gT7sYfT9DjEgbI8ijtNUTWhuPEVZ7/3JZLu8onlsuiXHRLU59/lOvCtCjOjYJEyspj X-Received: by 10.98.9.72 with SMTP id e69mr20856106pfd.197.1523023251499; Fri, 06 Apr 2018 07:00:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523023251; cv=none; d=google.com; s=arc-20160816; b=Oqfcf+hNzxHepD3MVJdSl/+QytN5LIlMO487FosrFzYm/d/tHBRGKC3YYO5mHVPlw1 70nUETqozdovT/1gu+zMCwSsxR6e7HXjWv5Tld7mWWO8h3dyfYHzRen+sYwMM874Sah8 VJTZD2S1HnVVANCkFoYU6GUYoOD9bLaP+1tuh1Y3J2w7g1F0IJ8ioqhxwka/TPDpBJO8 ziPeAaR9Z4utqoTTCc05Z0RXIs/OlyhyKg455GfOHFVHdtTGAlM68oGsMgiXsxjvhqR/ Piibw9PhhrgDi/FFOxP23Le0fazdqMzA0rZIfXLLnxYfFsqLQNG/jWUsvLkdg7yr/uSs w9cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=KxvO5QK6933giULWSUY/koDaiSTkF+EKl26C+o4kJzg=; b=afpQu7iKzmfx9MuMGJSkuhxFIMukpeyv+jFgexJho/xCthpOsk3EqESukDNnHP9i9F f5HmDDRoHTw9nTUswP8Bc+sI1oYMIX5FVPpK81Cyd/ETnLMQotIhrqH17VYn8Jo9ypLt bs2wyiZo74ufpSf9MaAITyblI8gWA5/qFk1ir5LmJ1/9qllliLea777Whln+9kBMaJa/ p8eRfTdTk6yRd4Cb1l9j7CFZljIRs3SGjKFYYpJIGfX5/IbsggA7gmMtJzSIF1557qAG BddmyLaJ87Z3tE0hFNDmtIdLvE5WoUdAmIbYISheoBvjyS4B6CMT/4CyN7o1KYkymc6w NNNw== ARC-Authentication-Results: i=1; mx.google.com; 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 h3si7258366pgf.257.2018.04.06.07.00.37; Fri, 06 Apr 2018 07:00:51 -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; 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 S1754727AbeDFN73 (ORCPT + 99 others); Fri, 6 Apr 2018 09:59:29 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37084 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbeDFNmo (ORCPT ); Fri, 6 Apr 2018 09:42:44 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 99CD6DB5; Fri, 6 Apr 2018 13:42:43 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Herbert Xu Subject: [PATCH 4.15 49/72] crypto: lrw - Free rctx->ext with kzfree Date: Fri, 6 Apr 2018 15:24:24 +0200 Message-Id: <20180406084352.938710449@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084349.367583460@linuxfoundation.org> References: <20180406084349.367583460@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Herbert Xu commit 8c9bdab21289c211ca1ca6a5f9b7537b4a600a02 upstream. The buffer rctx->ext contains potentially sensitive data and should be freed with kzfree. Cc: Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Reported-by: Dan Carpenter Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- crypto/lrw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/crypto/lrw.c +++ b/crypto/lrw.c @@ -313,7 +313,7 @@ static void exit_crypt(struct skcipher_r rctx->left = 0; if (rctx->ext) - kfree(rctx->ext); + kzfree(rctx->ext); } static int do_encrypt(struct skcipher_request *req, int err)