Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3949149ybz; Tue, 28 Apr 2020 03:10:41 -0700 (PDT) X-Google-Smtp-Source: APiQypLPiBmlAItsvEXlg7dnP7t+XgRu+D0bSjxaxwNdCNa8/zS3lMciBnKHBRsLQfg16vFBlIOi X-Received: by 2002:a50:8e4b:: with SMTP id 11mr21338244edx.329.1588068640841; Tue, 28 Apr 2020 03:10:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588068640; cv=none; d=google.com; s=arc-20160816; b=iziXDpvl2mHJdFT6D31b7XAHfydiz5d+rNP4+AdLaFWRnCfH9HZRmDLTvUf13B88bf WCk6ylBZiPrOsCJ4F5+7sdzOCJVZVIx4DvmBd3ZI/ij8W3Iie11bSNzU2SSUF14YeyMg jfuKdRAqQgJYs1fy4JcQR0sW+4jfItYKAHOLxviALre1+0L5CCE7vbsxm8ZXoFhslu5w n8iNqdSbOWwGZiz2jl3rMikL8OoIwoa7MuSwQKCbKkeAgr9kMfjpYUt8g3QZkvdFVuIH TpGMLQ7aze4lQ+8c02q3tA1byRYxRoBWqyeQUJrdOszr0+zfLIKdxy2SBeJn6SDduTxE zQBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=19uFzSxLeuYQo/dKtnMC70gpecW9P25YRkIG/IdYFis=; b=jJzDdUZE1e1J7ytp6cKw/x71wFrG1zxIilqXkZTpUJ5Du0rvalGbsRXPczqhjCzcyA xh1hf71/xzyTfrPa/qssLEs2t4F4EUp5YQX4wgbVDJaaLRIXmxcKLKSjctqm9pXMr5os o+dLTKVUV3VI6jVnDkvL/J/Lf1yRzXieZXME+/gNlgCAWpqo1crzUyWj2cHgCkWhihch XdRi+oQTXmCZBBdcJyebeWMF3uEnmXsN7V0GfeFTkaoTz/GnWvr3Nft4cA8QWRL8jSws XU7I8zxoPStlDpEENFhRl1ZoiAzfqiLy1c8MW88YzrBp8MRW7/Ae6cNFei1IXuIWUX51 AoDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BJLlb8pG; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si1789157ejl.173.2020.04.28.03.10.07; Tue, 28 Apr 2020 03:10:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BJLlb8pG; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727112AbgD1KKB (ORCPT + 99 others); Tue, 28 Apr 2020 06:10:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726932AbgD1KKB (ORCPT ); Tue, 28 Apr 2020 06:10:01 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C84EC03C1A9; Tue, 28 Apr 2020 03:10:01 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id l19so20827704lje.10; Tue, 28 Apr 2020 03:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=19uFzSxLeuYQo/dKtnMC70gpecW9P25YRkIG/IdYFis=; b=BJLlb8pGzYfEp6GzCKqh5hyRb9Z+CFHu82/QjzKSLTRBmYUaEzwgh0qywfT0Sblbp1 omsHg2O5c7shROC3AUhKXNpufAPD5s+ItTFajDZQBJkaT6+HjvfMzn2r9547lElYxoT+ gDIrVOfSQnJTs3hlqn5534veK7YCvfZ0QAyYstsR48rq6bYRM5WDFTB7k6X3i90OiQih hTZzRtKcAYdNVbw8q6eTgiNIjd6cRs2StGDirAjC0hmbQjN85xMB4CNayu6CiBkRE+dO CygZEHFQ7LtOVzcPxnHBuG0HSQ7Xl2p64VntOXCWtUgX94zMzb+VVvvxhRHLzpBfiD6x Mc/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=19uFzSxLeuYQo/dKtnMC70gpecW9P25YRkIG/IdYFis=; b=SYjyLGto8fN7Moeiw6SjTpS9NWPsB9ZDou824L1Dq2wZywQqq4bk4u61SUrGwn+5GJ 42AXzj0Z4bxzV+JWWySfxcFtJxuEfqtcElLkBdLx0GSqBzHfkDxJvjpxxyYOgmasyUnT q3opn+T6Jwn5Umw8ELsHEVZoRmlrHxZ5WKS455Tnt/sCXqH0LFXFB8bET/BScgEKt80F 8qsNaHGw/9m+z9lYL3hYm2WvxiuaQx79fU7bMQcTyujpuimaUmJPFrMH6JzyNNkMXYKw c3pl7PbKRWp5ab3GlVTkqCo/v57VTfrEllYHe0Y3AmHSVLpHDv7je0vTeCt7VRYhbPMO udlA== X-Gm-Message-State: AGi0Puavw3WIsuFIxPGCrlHXzLiRMeA4MP1QvlSdl+1XwNKIDeKbRSMV C5VtEZJ4nyUJZmOA2J+pQfeb+W3eo1pyi8RhgjO1rw== X-Received: by 2002:a2e:9c9a:: with SMTP id x26mr17471735lji.44.1588068599776; Tue, 28 Apr 2020 03:09:59 -0700 (PDT) MIME-Version: 1.0 References: <20200428051427.508-1-zhenzhong.duan@gmail.com> In-Reply-To: From: Zhenzhong Duan Date: Tue, 28 Apr 2020 18:09:48 +0800 Message-ID: Subject: Re: [PATCH] crypto: caam - fix use after free issue in *_crypt_done To: Iuliana Prodan Cc: "linux-kernel@vger.kernel.org" , "linux-crypto@vger.kernel.org" , Horia Geanta , Aymen Sghaier , "herbert@gondor.apana.org.au" , "davem@davemloft.net" Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Apr 28, 2020 at 3:48 PM Iuliana Prodan wrote: > > On 4/28/2020 8:14 AM, Zhenzhong Duan wrote: > > In both aead_crypt_done and skcipher_crypt_done, edesc->bklog is > > referenced after the structure pointed by edesc is freed. > > > > Fix them by moving kfree(edesc) to the end of function call. > > > > Signed-off-by: Zhenzhong Duan > > These issues were already fixed, and applied on cryptodev, by this > series: https://patchwork.kernel.org/cover/11476799/ I see, thanks Zhenzhong