Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3463038pxv; Mon, 19 Jul 2021 00:12:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo1KV4wTjKJsp42fY4Sld4fvgOtTDa3Lz1Z7qSw8BfoG/UlC6cxy1W8uWYX78c0FE5xNre X-Received: by 2002:a50:8d54:: with SMTP id t20mr31893812edt.288.1626678763520; Mon, 19 Jul 2021 00:12:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626678763; cv=none; d=google.com; s=arc-20160816; b=VZ7o87/NV0MYLroNoeJw668LPTXtrGgF1U1l8s9K98wuyTp+xyTQ4wCNJMxj9fcoUM UXNuamX6eL9oGrPiqXaW8uRE4glqD5G/I1vmF6u0DGtya/C/4QgEMnow/vTEP6cUQU9q laBTIvhvekffIIGQ627lqTs0FcpWe9lGNF2XUepPwo2Ci+pqpi/KmfhI6txP1IUCsVGR qVu+tMhDwKscnskhLGMTpfJkKZGIdNugkqQ8xtMw+d1mg1WR+mS1zWIYRtFsurDymrrh OzgQwn1ZEykA1//QsmK4A1EkLFUMGUnC4YNwOCy+aMeGD/yfqhr0rifhys5kGducB6ro jFZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=aDYvKa08CzUY9rquA/oGpE4EjdbXL/AzPcX8Pl87Kv4=; b=XLFq6749Q8jSQZJ//Qv0u0oqByaQ4moyC/XZQ9DdcGUXQsTKOtEh2r9gpS9DC7l8xO Z4U9N1YO0bAMFlR1cPYrAtIIhMve8EERkODvG0iZ0NMmDmZt3hVqgR1l116n+viscysb OLOyhDrko2O+2Lbg0O5x8w6c/zZP+xMPLJ7w4aOIOaaFmyHlAy3w39KaJVYyhxPxIQ+2 jmlINqYtCMfs9czt51MCw7RYtKiztAGyhhDRbz6iYoznDn+DIu3+u8UgEr8RhsdU8eAt kPCRGbCA/5P91ZcSadFc18oLFDcN9iA9tDWUNb4sR0c9FFvLx5+BeXwvy1MHbxruUF/Q VJ1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FyTGCQAQ; 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 n14si17900900edx.144.2021.07.19.00.12.11; Mon, 19 Jul 2021 00:12:43 -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=FyTGCQAQ; 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 S234345AbhGSHPB (ORCPT + 99 others); Mon, 19 Jul 2021 03:15:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:59392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234314AbhGSHPB (ORCPT ); Mon, 19 Jul 2021 03:15:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D45E5611AE for ; Mon, 19 Jul 2021 07:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626678721; bh=SfzfIESiqweKbJA1ZkJ1o77v1rHeHijV5oCcsieISZg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FyTGCQAQGRbn5WriW1wqxoIc6SGkUGdPQF30WZ+w/W6Td5dy9YpuNo/KVuAJEYIr3 fDpI4zSU5VNysM55pNFWt0+ZuiTv98E1hgaYHbdFjhA9pOfNrKrt0Mc/8KOQsvxHbf XRevG48ipHRdyb6YMfZFZy0GF8bZ2x0ikeXHzmfXdhcex3bBkiKsBo+nn7/iMByCMY OiYgYrjiywaWYoLLMCOzlin2sut4oxuEEmvh9P5Cy0pHspb6mxAzXVQ9ETdiUf3LPl 1GWhchKme8Bb9BEPJGL1MSU+4hX/AOj/sErL6JPe1y1nkueHRoYe8YWfZXtTn3NL8q J75xsWEJel0HA== Received: by mail-ot1-f52.google.com with SMTP id h24-20020a9d64180000b029036edcf8f9a6so17310678otl.3 for ; Mon, 19 Jul 2021 00:12:01 -0700 (PDT) X-Gm-Message-State: AOAM530K9rCfMzSVFmDjrUtYpUjZ4bOe4Vq77qpoOx0ghReLPE3oDVmW oDfmWfkwhwlE0BfQb3p9ldpezPhQOFu2KQfgEtY= X-Received: by 2002:a9d:2625:: with SMTP id a34mr12685927otb.77.1626678721252; Mon, 19 Jul 2021 00:12:01 -0700 (PDT) MIME-Version: 1.0 References: <20210716165403.6115-1-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Mon, 19 Jul 2021 09:11:50 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] crypto: x86/aes-ni - add missing error checks in XTS code To: Eric Biggers Cc: Linux Crypto Mailing List , Herbert Xu , Dave Hansen , syzbot Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat, 17 Jul 2021 at 01:58, Eric Biggers wrote: > > 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 > Thanks Eric. Herbert can add the cc:stable if he decides to, but IIRC, he prefers relying on the fixes: tag only.