Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1109093pxa; Thu, 13 Aug 2020 00:12:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0DqnCu9miOnkbA5xCWGwCxCHceY7svKDCNy5qzrB9TuG4m3x3LJB4qp8JA16jLGzjfi1F X-Received: by 2002:a17:906:57ca:: with SMTP id u10mr3660764ejr.290.1597302753341; Thu, 13 Aug 2020 00:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597302753; cv=none; d=google.com; s=arc-20160816; b=mJbs1sVrBn8uygVKm3Orej1gQp0MewDNhSH9bbcrciw16pnOZrbLcqdR98lz56vHUX pYPnA77zriocUYQ7I5vNZAd2Yd0chC90uqI1cJ8HLrJyJYvcL31BhkaLuTX+aFdbo7SJ ifyfswlGYSdpeOclmAeHI0lyVdTclTOKYQW6iwEm0lwQhQKbzQiXj1vdf+Myng5fXGQd Pumbshh8IEwuGzX5OeqFvZzg83Uk39uNh00dYTMDE5gGcyBLWoPCS/O4rNFt0qjyCYu1 43lLnIafXPQj/KIuWwyQk6gco7gKria3y2vNUeCyE0yAuMUTu2wbudL+d4BKC1Ii8EZ2 rAKA== 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; bh=26Iu/uhuocCY7yM8fwSD7f6MaZuqNaDzh9WFxvUv4KY=; b=gbAMaDrv6youYNzHoDwhsinHCTmHPAJJVkM7NSPicvkvPKBnrsvAuBuRC+xbjGx8kO nEwWoeEp8Wd7ERnXU7lyJSl5SMJrvr3vYHqgoccMudc1gw//7emnS5umw0m1l/nM54rt fGsPTqIU2vqPARDOTqlQ4r6HA5f7d2cYjGHkg8C2Ot6pxbWHf/rA+6G8NAShDR72w4kd dFdAUCoN8peiQ2bJ46GTCZ65ZRpy+MGJevWME4iTHqOM6qMAAasuJ59s12o1pckEs/yu btxR8hPgQ/CUWBnF0/AT5LY7O+9w4MBOjfzsjmGBJ+2hzSAdIEIdOuRrvSt+xW0jf8w7 vvqw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si2677561ejn.161.2020.08.13.00.11.58; Thu, 13 Aug 2020 00:12:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726174AbgHMHL4 (ORCPT + 99 others); Thu, 13 Aug 2020 03:11:56 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:55244 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgHMHL4 (ORCPT ); Thu, 13 Aug 2020 03:11:56 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1k67Ou-0003gl-ES; Thu, 13 Aug 2020 17:11:49 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 13 Aug 2020 17:11:48 +1000 Date: Thu, 13 Aug 2020 17:11:48 +1000 From: Herbert Xu To: Ondrej Mosnacek Cc: linux-crypto@vger.kernel.org, Stephan Mueller Subject: Re: [PATCH v2] crypto: algif_aead - fix uninitialized ctx->init Message-ID: <20200813071148.GA3894@gondor.apana.org.au> References: <20200812125825.436733-1-omosnace@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200812125825.436733-1-omosnace@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Aug 12, 2020 at 02:58:25PM +0200, Ondrej Mosnacek wrote: > In skcipher_accept_parent_nokey() the whole af_alg_ctx structure is > cleared by memset() after allocation, so add such memset() also to > aead_accept_parent_nokey() so that the new "init" field is also > initialized to zero. Without that the initial ctx->init checks might > randomly return true and cause errors. > > While there, also remove the redundant zero assignments in both > functions. > > Found via libkcapi testsuite. > > Cc: Stephan Mueller > Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when ctx->more is zero") > Suggested-by: Herbert Xu > Signed-off-by: Ondrej Mosnacek > --- > > v2: > - intead add missing memset() to algif_aead and remove the redundant > zero assignments (suggested by Herbert) > > crypto/algif_aead.c | 6 ------ > crypto/algif_skcipher.c | 7 +------ > 2 files changed, 1 insertion(+), 12 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt