From patchwork Mon Dec 17 07:23:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10732799 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 EDAE714E5 for ; Mon, 17 Dec 2018 07:24:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D606A297CC for ; Mon, 17 Dec 2018 07:24:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA373297D8; Mon, 17 Dec 2018 07:24:49 +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,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 C2854297CC for ; Mon, 17 Dec 2018 07:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726467AbeLQHYs (ORCPT ); Mon, 17 Dec 2018 02:24:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:49772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726395AbeLQHYr (ORCPT ); Mon, 17 Dec 2018 02:24:47 -0500 Received: from sol.localdomain (c-24-23-142-8.hsd1.ca.comcast.net [24.23.142.8]) (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 363B3217F4; Mon, 17 Dec 2018 07:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545031487; bh=noPdC0536ggwA9DLvm9stxwd0hwijeaRO4Q3D4bB/ew=; h=From:To:Cc:Subject:Date:From; b=QmMgYb9/E7ipCKx1kkfh8ATGe3RVSfqUfgzDDoHMrtZ7I5vlLruay/MgRhguZ2eWs WQJfRYzl5dfsW7WOal2VaIQN++DMrAjAxNACYNN+G+M+bdq9armVX2YpE5bxqt6XiL ZVQaYvgioN6QZNKzjXOnH1Aw/3D8oedirpjagSTs= From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Cc: Rob Rice , Raveendra Padasalagi , Gilad Ben-Yossef , Yael Chemla Subject: [PATCH 0/3] crypto: authenc - fix key parsing Date: Sun, 16 Dec 2018 23:23:21 -0800 Message-Id: <20181217072324.16844-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 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 Fix incorrect validation of the key passed to "authenc" AEADs that allowed crashing the kernel via AF_ALG. The real fix is in patch 1, but two drivers had to be converted to use crypto_authenc_extractkeys() too. Please note: for the bcm and ccree driver changes I haven't re-run the self-tests, as I don't have that hardware. Please do so if you can. Eric Biggers (3): crypto: authenc - fix parsing key with misaligned rta_len crypto: bcm - convert to use crypto_authenc_extractkeys() crypto: ccree - convert to use crypto_authenc_extractkeys() crypto/authenc.c | 14 ++++++++--- drivers/crypto/Kconfig | 1 + drivers/crypto/bcm/cipher.c | 44 ++++++++++------------------------ drivers/crypto/ccree/cc_aead.c | 40 +++++++++++++++---------------- 4 files changed, 44 insertions(+), 55 deletions(-)