Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1742608pxv; Fri, 16 Jul 2021 16:58:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEr0rCa6B527U3JOL8WSMoAs6hyi2DrHWvrKpVKTseuVjlJQvyiXnow0pPH5kfYMq9ysp9 X-Received: by 2002:a92:c5c5:: with SMTP id s5mr7702950ilt.271.1626479939084; Fri, 16 Jul 2021 16:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626479939; cv=none; d=google.com; s=arc-20160816; b=Cjg7QP7bKsuxG7jjZSARYUhWIV+tK6tMfh5I8HVDcLzM84zyHhvAme6JCVOaHdMqvX h85Hg3vA2+w86C85fVVexR/ToX4H0rgf9y2cUlhvsfPZ95qgedcaO/SnmrykdxCqGWLK F9l8Dpe1dC4JqIrxUCrUNZDR/lF/rVHAEDzvn1yheCqFqjipIEn2k6ObKk6VDJHONh6k CZxr3Eu9puwxtKhLlFF9FwRPnp8MkfBu1Eu+ImWHvaIaCrh1MXcAU0zdCoQ1bDHwYkuw dNLhbCfmbkrr5SQejwKMKwYUvruPm90bXOvN6mvKv2Y5iiws4Hue8hLTx5h8ZAQUuadr q7Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=G276lP5ObYN05uhROMzi1en4CsRqskNcRH9wU6v3uqc=; b=Du7vlhCUhAa/gqmJkg/KLWEL0CJPswusuV3NwdKT16HQSQ0u07g0oo+TOqXyiKnawh mzD44NC3F1Jlr8F9q+IKapUyZXbNB9bjF/xnQk8CXn8Bx1y1ks193PvXDX9JNysLGwvg Fk4GoQHLH4U2YLwlH57c5VB3swPr98m8bQLoD1w01gFysnk6djfOtzXLnd/7yGMVq2Jf 865XDtIPTF1k0U+ohY7KmSr+KxR57XB+4DK2WNSYr2joTqESezrZyPa9f+ImgoipEJKd B2igD0EMzPCmiKQnrLI5wuF9BanSCvol3K+GShkwid4yopvkVEAa1K/+GVYITqjC5dQS wJeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iW1Ti2r7; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v25si12496835jan.107.2021.07.16.16.58.34; Fri, 16 Jul 2021 16:58:59 -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=@kernel.org header.s=k20201202 header.b=iW1Ti2r7; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbhGQABL (ORCPT + 99 others); Fri, 16 Jul 2021 20:01:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:39766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbhGQABJ (ORCPT ); Fri, 16 Jul 2021 20:01:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 455C4611BE; Fri, 16 Jul 2021 23:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626479893; bh=xFU807Rlr0Xhkm1tdcSSaE05dk80+vL9LycoYbKbLJo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iW1Ti2r7qjCJPHnx96UiS73IBxi7ewc007dvYIh6Dyj06hWjURZH1R4SVn9ymFFG4 GmpjGHCVvjlnfmiNDXbt3SFlQQHI3T5eOBPBoUBTLGQDHN0FggeHakd5ww/nLC/+Nk FpkSahp0n0kVqZ4K06URjbZrkVl/E4TJZNf8paLip9Cj8+F7UHp+ScHZDCv79P+gvJ FvmIOH28sVfJokTM7xHbhV0nCYVoE3ySB5FcUuVFSlANJL1UhzLCib4YIurmybI48n eVBKabKLea2jSMovp9M58FN0+/4TAf8o/yaUKK5sOfRraVgAW5gKgMgbTup6o8y1gi /hqXVR7zcAIqQ== Date: Fri, 16 Jul 2021 18:58:11 -0500 From: Eric Biggers To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, Dave Hansen , syzbot Subject: Re: [PATCH] crypto: x86/aes-ni - add missing error checks in XTS code Message-ID: 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> 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") Add Cc stable? > 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(+) Reviewed-by: Eric Biggers - Eric