From patchwork Mon Jul 23 17:54:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10540701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B40017FD for ; Mon, 23 Jul 2018 17:57:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4613626256 for ; Mon, 23 Jul 2018 17:57:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A21C262AE; Mon, 23 Jul 2018 17:57:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1B9826256 for ; Mon, 23 Jul 2018 17:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388105AbeGWS7p (ORCPT ); Mon, 23 Jul 2018 14:59:45 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41642 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388084AbeGWS7p (ORCPT ); Mon, 23 Jul 2018 14:59:45 -0400 Received: by mail-pg1-f193.google.com with SMTP id z8-v6so908683pgu.8 for ; Mon, 23 Jul 2018 10:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=lB8Oo5MTmli98afN1C+X4qwRAzSEATUeydWKOPG06VU=; b=OOESOi20m2RwyXm37oYdFZhdqhCVG4CPpBXAka+p3f5d33hT2psjXJJzU3BHi+ydPW AOQuVyUK3dQvU8sCst+uRgXZC7fz5V7Ez+/uVcW5xj80HLQ6fr8lRAM7jd2aQRP4QN6i l8iR9XNk5igj8scZt7IcuRgr2J902vXlZnqy+HK8J76QoT0a/Hm0LfmIMKJMoJur4mY3 9drDjf5rQ8H53L/CQKOEKng4MOZ8Atowxv+oUHQGmzR4mJSzjDJ1U6Na6CRECbSTh0cB A7ZFuVhLigEeBQvFq79uacO1RQZAEWfKHfuA+61OMMHqxj38pZ5ZTDpLb2QmOU6yy/kI vh2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lB8Oo5MTmli98afN1C+X4qwRAzSEATUeydWKOPG06VU=; b=FZpY/berOHGi92n0n9wcL+0r/zduGr0V8vEmHNVxBS45kNP0WMOH/EYl9Zo1/XOnKL PfxX+ablLG0n/P2uVHZvCi+NdPItx6gWwWe47AbJfutC746qtEZ2is3J1n/ZNjU8OBaT X5RlfIA3gaG8/TNtaRSwsTU+eP3Iq2jQtjeEQKHNX3d2vl+Nw7PsaEvOFz09ks95pG1M 29PsMY1f8W6NE6Gs0ORBPXjibxazfYYR46ipHmdgNHpdnMep1ilExQIEKSpigrFm7mxO z2aijDEHR6yThpKuhDMe1+vCbvW9SAkidmL4yNkhCISqnXfS1zNj4YReUvqoQRcfYP9s B85Q== X-Gm-Message-State: AOUpUlGDizWBRKvBbjygA6+yP2Ietb5lg4AmAAXcci4G4QVALRzblgy+ rGDcBv4XAF+LD5kzPwXWbaQDxETT X-Google-Smtp-Source: AAOMgpeFbMYbuqR9SObHWuiOxYzi1V5aPQNov3Flk7JbOFPojqTEOV2yKpIc3w3dUxCf/g8Zbei2Ew== X-Received: by 2002:a63:314f:: with SMTP id x76-v6mr12886870pgx.373.1532368643066; Mon, 23 Jul 2018 10:57:23 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([2620:15c:17:3:dc28:5c82:b905:e8a8]) by smtp.gmail.com with ESMTPSA id p64-v6sm15575578pfa.47.2018.07.23.10.57.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 10:57:22 -0700 (PDT) From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Cc: Liu Chao , Luo Xinqiang , Gao Kui , Eric Biggers Subject: [PATCH 0/3] crypto: fix crash in scatterwalk_pagedone() Date: Mon, 23 Jul 2018 10:54:55 -0700 Message-Id: <20180723175458.108900-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.18.0.233.g985f88cf7e-goog Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers This series fixes the bug reported by Liu Chao (found using syzkaller) where a crash occurs in scatterwalk_pagedone() on architectures such as arm and arm64 that implement flush_dcache_page(), due to an invalid page pointer when walk->offset == 0. This series attempts to address the underlying problem which is that scatterwalk_pagedone() shouldn't have been called at all in that case. Eric Biggers (3): crypto: skcipher - fix crash flushing dcache in error path crypto: blkcipher - fix crash flushing dcache in error path crypto: ablkcipher - fix crash flushing dcache in error path crypto/ablkcipher.c | 57 +++++++++++++++++++++------------------------ crypto/blkcipher.c | 54 +++++++++++++++++++++--------------------- crypto/skcipher.c | 53 ++++++++++++++++++++--------------------- 3 files changed, 79 insertions(+), 85 deletions(-)