Received: by 10.192.165.148 with SMTP id m20csp4751183imm; Tue, 24 Apr 2018 07:53:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqgTEZR4DVRQDpp/BHsuXV5CYv/5LV78P0KcmhVIVsk0rgjfUVCZyQhFRkXXuDbRGwANDCj X-Received: by 10.167.133.71 with SMTP id y7mr3609564pfn.210.1524581595432; Tue, 24 Apr 2018 07:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524581595; cv=none; d=google.com; s=arc-20160816; b=dKEF+IJKil23bk8aqLq8l5uJJGDuvbDxWErr8evZH4scbPh9b3lZQWcSfnBc/iZnRQ rQGbM8c3MJbTe8++hrnU/+m9yfewfcTkT5qDux+NhLCkQblnZHUC4AS7JTVV9W2j5eiD vasNeF+JL4IbL6VEYBFRy/q6FtnfEMQNe9J+aNq5Qp1C7rB0GvbcxwWkEQjaDPaxnwqy rBRNyS9K8rW+buChSlPbxAy1QHM3b5L0FJDSKkUjXEBWAXt/eG1Gd3Wp+FLS+UVkg+jX q/f8Sn1x9NrIndV50JsG242/mwRltfRF5QuB2Me6tjUcVbGLjyc/35+bDyY8yNFVWzJ8 Isag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=kdL4JGFE3ryE5U1EgjLo8vjSQt2sKWgOGPYUOuv2aC4=; b=xLhGEkOIIPU8ra7wjkV6gkXiJLyzNop7z779DG4zO0tmVacyRxrn37NQhsYh1YQd2A PHHLXB2Yi5uHkTEEe3lAMErBlRkXBtC6R92AVI/k4URVv88qeKYT+Yd2aFeH1kSFuLen KhoMujNvv0VQ4vhoUWX1Dy/EUtJIeO+IPlOSXFCfQ31gKUprz4yvHnatQ+WNMUv3yRyv J8OnPXAu38WPrk+MLsaWnNuzVTFT55MJIx9u6FRmbzwzJNhuJQQGVRG1A5JjXrZkqgiY PscwF/p354boYRuOb6eNXVZ87X8ze/WeOw1woYRS44pqC/EJpnMc5yG2luDC1IJP6yfG vMgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=sZkFzkU4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si1598470pgr.632.2018.04.24.07.53.00; Tue, 24 Apr 2018 07:53:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=sZkFzkU4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751487AbeDXOvd (ORCPT + 99 others); Tue, 24 Apr 2018 10:51:33 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33991 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbeDXOvI (ORCPT ); Tue, 24 Apr 2018 10:51:08 -0400 Received: by mail-pg0-f68.google.com with SMTP id p10so11056582pgn.1 for ; Tue, 24 Apr 2018 07:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho-ws.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kdL4JGFE3ryE5U1EgjLo8vjSQt2sKWgOGPYUOuv2aC4=; b=sZkFzkU4SHvPSyPbUBlYL0oKBv3U9f87FG/DshdnobqhiSwwxti4qHCARkRQsos7aS OKXlx8xFBswG3yW7yReEwMQH+eR/7YVodR3oRBfkmhYpQUukbwQudTFmtTUiMK4NNjML DGWwGGWuSNfvq8S36/MgcWg3AR7crNI7eQtnfLKeRSwfe+avBATtIMkmbVuSpUJzlwOm KLfqMcJ4d2NosmgucNeBJ+qdVh4Jl/NF8NwZ9pipxiaQFKtMA78KskzT8Eyrn3rm49F9 +RxMDuVmiJnbMoXAvALi/RnQhZlqMLJe21hD1PqsOCpnGDGL+v+uvd47Mr5lbgMvRmnm XQ5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kdL4JGFE3ryE5U1EgjLo8vjSQt2sKWgOGPYUOuv2aC4=; b=NcCcT+NoC/tBrysSt9On4XNBfpnOaLOUV8vuY8ThaQ6Iy19ppxemDbGeVAd6jLuYQR aK8IaPsJ9BfOvRxWXRhtxV0DoUdBcblEb4nYDn1mvDC3Nj6Eod91K6Ouz3uA9ebkLJRY e4sWVy72id2ozqsUu8co8rWXIqUDvLTEJTnfoTqYrmgMWo1NpOB9Je4w6XDH+cdRA5t8 +DzHV1rNPg0jldeNkbjCQQ2z3pPKzBKg16SkABbeuJp9B39PuGhWVpZrAv6jHdq1kKUK TRqGVcGsVv5CY/+Lkb54ks4Zcc0bzNJZVVkwWiAPcAhjZ/PTo5ufsTL0Rsi4DbVKFUtZ w5ow== X-Gm-Message-State: ALQs6tCfU2HScbeaIG7kiQyz4FriBoQ7Swgp2OZ6opOxWhj3FnBKML5G 7l3vjRJ10pP/5u9sEtbAzi4oXg== X-Received: by 10.99.123.17 with SMTP id w17mr20463190pgc.8.1524581467596; Tue, 24 Apr 2018 07:51:07 -0700 (PDT) Received: from cisco ([128.107.241.171]) by smtp.gmail.com with ESMTPSA id n73sm37864288pfb.108.2018.04.24.07.51.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Apr 2018 07:51:06 -0700 (PDT) Date: Tue, 24 Apr 2018 08:51:04 -0600 From: Tycho Andersen To: Tetsuo Handa Cc: ebiggers3@gmail.com, dhowells@redhat.com, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, jmorris@namei.org, serge@hallyn.com, Jason@zx2c4.com Subject: Re: [PATCH 1/3] big key: get rid of stack array allocation Message-ID: <20180424145104.GC3125@cisco> References: <20180424010321.14739-1-tycho@tycho.ws> <20180424045015.GA4281@sol.localdomain> <20180424143539.GB3125@cisco> <201804242346.FHI69745.SQMHFVOOFLFOJt@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201804242346.FHI69745.SQMHFVOOFLFOJt@I-love.SAKURA.ne.jp> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 24, 2018 at 11:46:38PM +0900, Tetsuo Handa wrote: > Tycho Andersen wrote: > > > > + if (unlikely(crypto_aead_ivsize(big_key_aead) != GCM_AES_IV_SIZE)) { > > > > + WARN(1, "big key algorithm changed?"); > > Please avoid using WARN() WARN_ON() etc. > syzbot would catch it and panic() due to panic_on_warn == 1. But it is really a programming bug in this case (and it seems better than BUG()...). Isn't this exactly the sort of case we want to catch? Tycho