Received: by 10.213.65.68 with SMTP id h4csp685570imn; Fri, 6 Apr 2018 07:17:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ZghTj83MVnNeGNmGGzwTASm0pLwQ2l+jc0eHejoLelohk9XRZK2PX7nHoqkrhBSvivgJ8 X-Received: by 10.98.192.66 with SMTP id x63mr20542403pff.135.1523024254126; Fri, 06 Apr 2018 07:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523024254; cv=none; d=google.com; s=arc-20160816; b=Q3ZrZ0S+n0ve+OYWsEsIuo/JzWjC/EjDVwOwlMe5ez+/tlWcNzRXmZhVMqgh8ulSch HBBG5J06BgJFS7tikj7LSa9cU3Lyk4e0uRbUyohw5Bc185ftJOlDDjfW8O/7CwMRRrsp fBXHY+U2ksh7d3c5rQvmoaQAsf4hsXdqjDHEmHtTIOG0pXiPEWgBVrgpSbRbMqvrw+PF jnc0YRzpYVCAkcyYbVrJZ4/N3B3LReMvAIVIqoNzGO3j1+PSB9K5C+0n58hAi3XSFnVw /OrpA22Or/OGxb/oO61efrS5+PfXDw/e4GqQMPB36+m1PnGMzOF+88AS9rHL8rT0vbX6 G8qg== 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=FOPixltBH659ldpt61albG65uQnQzTKBY5mUE5TuKsk=; b=Tj7zTErJR/J9oVDExH5OQADOVUcw6gJLXxm7OXeGbbzmmMfDoTUmWd68csD/WkoPIf 3VTagpczTTiWBfgMJKewRVoSix4gFV8eM9JQm8MEMgSKGO3EnhJksxn/urRJ1C7FjA3f wSEz04XmRKa5A30qMj/sejWO8GeEftQEW40NzciqKAG8bMNhylvlPpM7OVGiuM2JuJOB ONxgRn+GNwoZQUDmuUWK1nX9JAz/3gFTsw4acCAQApVNqpwadNe8DYyrqVA1Ha20HOXs SdBre3cVDQyvULgb54vai0qqP6UAsQ7XSYE+uOPLGDU30oNLfmnzw9Ea3xaoXbGIgxbc PAuA== 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 i21si8196039pfk.34.2018.04.06.07.17.20; Fri, 06 Apr 2018 07:17:34 -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 S932588AbeDFNjQ (ORCPT + 99 others); Fri, 6 Apr 2018 09:39:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34238 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932575AbeDFNjN (ORCPT ); Fri, 6 Apr 2018 09:39:13 -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 7869CD17; Fri, 6 Apr 2018 13:39:12 +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.14 46/67] crypto: lrw - Free rctx->ext with kzfree Date: Fri, 6 Apr 2018 15:24:16 +0200 Message-Id: <20180406084347.373431668@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084341.225558262@linuxfoundation.org> References: <20180406084341.225558262@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.14-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)