From patchwork Sat Nov 3 21:55:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10666767 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 6E3C613BF for ; Sat, 3 Nov 2018 21:57:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DFE929E16 for ; Sat, 3 Nov 2018 21:57:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40D1E29E24; Sat, 3 Nov 2018 21:57:24 +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 DDBC829E16 for ; Sat, 3 Nov 2018 21:57:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727154AbeKDHJx (ORCPT ); Sun, 4 Nov 2018 02:09:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:48252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726622AbeKDHJx (ORCPT ); Sun, 4 Nov 2018 02:09:53 -0500 Received: from sol.hsd1.wa.comcast.net (c-67-185-97-198.hsd1.wa.comcast.net [67.185.97.198]) (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 A6661204FD; Sat, 3 Nov 2018 21:57:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541282240; bh=MEm+oRzl5F9XPKYzzN3UBxB7Jl8L/BkoBbZX0zgNs3M=; h=From:To:Cc:Subject:Date:From; b=QpjINm/noMgUyN8oCKWXnb5E/0PN3y+0LpAVE1rJMVVes8oovPKEqmUtuJa/EJxvD DjVyZTwx442TGfHsSdVkBhjUL1EZVGEB++2Y1WLVhawiAPSRCHiJEJ34TljKu/8KVq xNUUf3UwdLuV9J2nYuT9VX29KAdrO671kJgzSgZo= From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Cc: Corentin Labbe , Stafford Horne , linux-kernel@vger.kernel.org Subject: [PATCH 0/4] crypto: crypto_user reporting fixes and cleanups Date: Sat, 3 Nov 2018 14:55:59 -0700 Message-Id: <20181103215603.16250-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.19.1 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 This series fixes all the information leaks in crypto_user reporting, removes some redundant reporting functions, and makes some changes to reduce the chance of similar information leaks in the future. Patch 2 is based on a patch already sent by Corentin Labbe, but it was incomplete so I fixed it. Corentin Labbe (1): crypto: crypto_user_stat - Zeroize whole structure given to user space Eric Biggers (3): crypto: crypto_user - fix leaking uninitialized memory to userspace crypto: crypto_user - remove redundant reporting functions crypto: crypto_user - clean up report structure copying crypto/ablkcipher.c | 32 ++++------ crypto/acompress.c | 10 +--- crypto/aead.c | 14 ++--- crypto/ahash.c | 12 ++-- crypto/akcipher.c | 11 ++-- crypto/blkcipher.c | 16 ++--- crypto/crypto_user_base.c | 95 +++++------------------------ crypto/crypto_user_stat.c | 123 ++++++++++++++------------------------ crypto/kpp.c | 10 +--- crypto/rng.c | 12 ++-- crypto/scompress.c | 11 ++-- crypto/shash.c | 12 ++-- crypto/skcipher.c | 15 ++--- 13 files changed, 116 insertions(+), 257 deletions(-)