Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1129534pxv; Thu, 22 Jul 2021 23:55:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7LIOq77Yt9Lsn+geUqqD8mYUZItBJR65jshU5kti/QXuGDIwrl2AYUn2OOANuFYmcf0K3 X-Received: by 2002:a05:6e02:1354:: with SMTP id k20mr2520458ilr.169.1627023307415; Thu, 22 Jul 2021 23:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627023307; cv=none; d=google.com; s=arc-20160816; b=WlPJBWMqA168C4cYLawQ03Ecibc+96E6LyUOWWiNUsvorHG0N575JmkbOUcwf7kxb7 3Iy07kasiSRoQ+7zm+KiSonaC14/PuYjF65jVTdQOCowH2LshjbC6jbhJiVnjqg8fWeg qwApoViwFkzP1R5vEofSZVVahie3oTgd05yRrXQdwFQug1Ke+kYLrdbsafKD8ryJi3iB AFdEvTP0Ap/KXzwZApw7I6MigYKy9NaxKY7xp8VuDyoeJtQDQxxL4wej2tzuTrhLmbR6 CwGHFQwknhXApwvFC5kFSuxrZUuYMqUZciQEtUWN/9y6/2LBCaWp6mJomCAnVMzAVoGv lRlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=T0pOvpGW7149xtdGATEHh/qFda6Fr16FlXUlo0Z+tCg=; b=ShwiKD9c8AcoTt1s4Iqu3RIYW/9b4w8eScrNNfNoahNRLql5UNMNniGHyY4zr6u0eP v73ThBL1odaDLP7VgvYD9F8Dfz8QVBxw21liVXULK6tqmUc6ocEG7GUVa8goJykvejf1 nTfXFcQZ9jCrp3Nvvbrkj8vUOHJNGZKKz9QORGVOKEe7TNs4raJispr7yTgEe+++DNXA o42IOAZAQDmed3y8h02ffe3soJ5Md96Rt/345fVAeBs+HyvORFbnwNa+rgtYXq2RaqF+ 67zQcos73sEEwQFYdGIaU1QtculkFqXwXY8keAfFE2Q9FOk9soyjFB2AzIAvMWWs/r9B wNkw== 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 d2si17124596iow.58.2021.07.22.23.54.46; Thu, 22 Jul 2021 23:55:07 -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 S234162AbhGWGND (ORCPT + 99 others); Fri, 23 Jul 2021 02:13:03 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:51490 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234164AbhGWGM7 (ORCPT ); Fri, 23 Jul 2021 02:12:59 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1m6p3s-0007C1-Sw; Fri, 23 Jul 2021 14:53:32 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1m6p3n-0002bE-GW; Fri, 23 Jul 2021 14:53:27 +0800 Date: Fri, 23 Jul 2021 14:53:27 +0800 From: Herbert Xu To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, Dave Hansen , syzbot Subject: Re: [PATCH] crypto: x86/aes-ni - add missing error checks in XTS code Message-ID: <20210723065327.GA9958@gondor.apana.org.au> References: <20210716165403.6115-1-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210716165403.6115-1-ardb@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Jul 16, 2021 at 06:54:03PM +0200, Ard Biesheuvel wrote: > The updated XTS code fails to check the return code of skcipher_walk_virt, > which may lead to skcipher_walk_abort() or skcipher_walk_done() being called > while the walk argument is in an inconsistent state. > > So check the return value after each such call, and bail on errors. > > Fixes: 2481104fe98d ("crypto: x86/aes-ni-xts - rewrite and drop indirections via glue helper") > Reported-by: Dave Hansen > Reported-by: syzbot > Signed-off-by: Ard Biesheuvel > --- > arch/x86/crypto/aesni-intel_glue.c | 5 +++++ > 1 file changed, 5 insertions(+) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt