Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3843239ybl; Tue, 20 Aug 2019 03:09:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWPV4gLiCPR11TXnFkDYve8bUA0s/asqIFWsp+YQZYG/m2pNV3nQM67IXZcrGMMVVUg/Xu X-Received: by 2002:a17:90a:a105:: with SMTP id s5mr25112103pjp.51.1566295795250; Tue, 20 Aug 2019 03:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566295795; cv=none; d=google.com; s=arc-20160816; b=qBGRDXWaJuAH41s3HJzO+wxqteEVIXNlUnyKJRG4TTRpkaACImyHYAKGm/qxQijtyD NBWB5xgX0VmEzW7ygreFFaKO94VAaB1lN57hAKrnbkMv1cSymnb0Ha7svDdPtnC2qjgd vRigurlERDB5wyhXhohR5JFP3HNZ7mBezjaLfhDUeRQx2Id+QpYroIMoknwY3oN8VnzF alYSsIh12gJhvK5lXLtq03c5WYEW1zNVIPtb7102XBCA0Y00dnbY9La5IEt7ae8jVKdk uD5wXJSq3fcLka3RszYXYO31NG0uR8AwY3Pfmyv9rdXNaQafbVDIVJBHgw/l/LDmQMEU ysmQ== 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=tj94CtWULP9YwIGoX4PYDyuTLQi8vJu6KPEJYq+tegA=; b=PmLKUMpyF8XeFXOurGIsTtF3STpsgzFI06FyfA9s6opEtuYJBmp4NPrFMfd+h0pl7T X3B7ubkQ+WIaGLfUXL/v+q++aNiFywjCkGZHnF//MyveexbGU+fR6nnSSIW+rrpANppd w41ZRq4IOuWc7QoUBUnXS8IaVyMt+MVbNEBRUzrct72f8sFNaEopmxE2mlYKc8bvEX0+ okd1QNcBRHJCCedZ7+ICa0uU0AKDhpvS2y9Um5XCRSrft9DxtKitthFhgJVxw3IJvZFk TvzT9YGM6BXch6OLCB5WnDJD4XIgcpvcJ01IydGhPWGBtN+r8CmpO6Au9PhZiuAzPIkt DfnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2dDvhxC0; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 92si12072162plc.217.2019.08.20.03.09.38; Tue, 20 Aug 2019 03:09:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2dDvhxC0; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 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 S1729194AbfHTKIB (ORCPT + 99 others); Tue, 20 Aug 2019 06:08:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:39390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728771AbfHTKIA (ORCPT ); Tue, 20 Aug 2019 06:08:00 -0400 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F166C22D6D; Tue, 20 Aug 2019 10:07:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566295679; bh=xjzxPC39roF359iKa4+85RErHu2AaZeqNn0TAyH5nYs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=2dDvhxC0lxyuJ/Y0FeBCg8RXf0uP7HuEQX7TYEkmlMj9hOeq9bdzDiZdI4Ke3+rUm 84SZ+vom60ztBDUGHB8bCXbnMf52NhscpAawCdftNwaYSgWpN0cchQ+IaqSW/6mTT3 4W97ILc8PyDNR2Q9SsGJ/nR9FXZJtUkVEurMmpqQ= Received: by mail-lf1-f41.google.com with SMTP id c19so3662549lfm.10; Tue, 20 Aug 2019 03:07:58 -0700 (PDT) X-Gm-Message-State: APjAAAU1NKEtVtUM7O6Wvizba6lz+0vvK5Qjmn/IA+HJDxSiWQL6gmpb ANJs3MUMiLAiV5Xwijf8CbDUjVcABNHkRGDswi4= X-Received: by 2002:a19:c20b:: with SMTP id l11mr14818137lfc.106.1566295677082; Tue, 20 Aug 2019 03:07:57 -0700 (PDT) MIME-Version: 1.0 References: <20190819142226.1703-1-ard.biesheuvel@linaro.org> <20190819142226.1703-2-ard.biesheuvel@linaro.org> In-Reply-To: <20190819142226.1703-2-ard.biesheuvel@linaro.org> From: Krzysztof Kozlowski Date: Tue, 20 Aug 2019 12:07:45 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] crypto: s5p - deal gracefully with bogus input sizes To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, Vladimir Zapolskiy , Kamil Konieczny , "linux-samsung-soc@vger.kernel.org" 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 Mon, 19 Aug 2019 at 16:24, Ard Biesheuvel wrote: > > The s5p skcipher driver returns -EINVAL for zero length inputs, which > deviates from the behavior of the generic ECB template, and causes fuzz > tests to fail. In cases where the input is not a multiple of the AES > block size (and the chaining mode is not CTR), it prints an error to > the kernel log, which is a thing we usually try to avoid in response > to situations that can be triggered by unprivileged users. > > Signed-off-by: Ard Biesheuvel > --- > drivers/crypto/s5p-sss.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof