Received: by 10.213.65.68 with SMTP id h4csp658131imn; Fri, 6 Apr 2018 06:54:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/9vnlK4JbgrFBc1jsuoopbPCXzKF/GX8dhLgPEvI0zFqj7Na5/vdUwbH3AiFK+LBxwVzVc X-Received: by 2002:a17:902:d03:: with SMTP id 3-v6mr27550995plu.245.1523022870771; Fri, 06 Apr 2018 06:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523022870; cv=none; d=google.com; s=arc-20160816; b=Lei7TCL0bZ9fA878xoARx/5mlgABI7UuLAtvX1swNTf0C4Io+JWlX9YewbR4+uCiFi FCMfmBYJZrOQlKDowfrZ0ckNsEOUgctY+m/4+ySdZ3KdACXYG4hyQ3+szxHOynC9cXZ2 d5OrYzER/nYfHoDt1om9dz7RTH3d4Xpdi85PMWSwinVaCWX1OhuwYxGQxwlskqK60C4r C+F45ChhWRRonGgWKfsdLGJszAUllDMLQ+Co6fHUyrdHiqxcl1kD5Nb9SbTn29V4XzyA Tmkh0zYWi51N1d6IZOJE9yUOxEoJ5pGTgwSP7067w4IhmDCwteoLndvSH/JntwQpd+g4 Nnpg== 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=j9Xfyy31P5u8yYHWJchKlOadTSyPQ9ktFThodAMCAT4=; b=D387iFlaIi9h2DxcDAlDct/cVRIIGcAHI2eMmZFK6W5RJzOyuWjXnyFpVqTZlzyu/L 8GQag1aLFQc2iNshOBbyZlF4zxk0disIQH68SvMbX06MOnTvMEL/9QGncmyTssUuyJYb w3Txh7SlldI2YWU6bUliSmtybYjgGJkoE0ZnoJxazaal6dU1dtvI3GHUB91swV/XswB5 YKJXAGpXY+R5f8XBPRCIxlU1hAa76AUEGN3ghE/HJazLHHNG8j1DhIIZB+PkPK8wCyvN ueyZvaXm5AZSUijj/IX1RaSVqNqmSx6IjbZNgrbE0L5XhxFL/Q2Y/AFyMwgZ0c8cvjTs 0UXw== 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 z131si7339902pgz.184.2018.04.06.06.54.17; Fri, 06 Apr 2018 06:54:30 -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 S1752863AbeDFNw6 (ORCPT + 99 others); Fri, 6 Apr 2018 09:52:58 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37660 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756885AbeDFNoR (ORCPT ); Fri, 6 Apr 2018 09:44:17 -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 258B9E0B; Fri, 6 Apr 2018 13:44:16 +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.16 10/31] crypto: lrw - Free rctx->ext with kzfree Date: Fri, 6 Apr 2018 15:24:35 +0200 Message-Id: <20180406084342.491101095@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084340.999820380@linuxfoundation.org> References: <20180406084340.999820380@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.16-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)