From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DF06C001DE for ; Fri, 11 Aug 2023 19:34:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hzuYs+CjhMK60zxu18/bo0DRMtL72vwxYgw3Fe9bmCo=; b=RGVqxRd92Oc8mN 9rXUPVKgmijBSh0QvwW4ASawVp1StU9PWNaoMj/CKm/X+c8YNLA2YWhoihWO1XQWDr8VVuzXcHgc3 WLgp7eCqmKvj+fFZLzaBGlCq34z8UTvrygGxQ5elLOvDQIZb/O50BsC2qzeT4N/l2wR8Mkr94PaaY SpXwDPZG30RMRUSLT7yPeLRE+nuW438RPFRMI1L0Kvp83TFTKPwOoLnLg0rOOopiemeYfGN9/7bZX YIaPJE8JZJH99z8EVrssN/oU6j0giKIslMivdVNlLqxSolalyyR5SWXAOsAEieJSMlF9gXOS/BS+7 rsfOoF9jZs0e3UA/Li0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qUXtd-00BTCe-2l; Fri, 11 Aug 2023 19:34:05 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qUXtb-00BTBe-15 for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 19:34:04 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AEB4E655CF; Fri, 11 Aug 2023 19:34:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DBFCC433C8; Fri, 11 Aug 2023 19:33:59 +0000 (UTC) Date: Fri, 11 Aug 2023 15:33:57 -0400 From: Steven Rostedt To: Kees Cook Cc: Marco Elver , Andrew Morton , Guenter Roeck , Peter Zijlstra , Mark Rutland , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Nathan Chancellor , Nick Desaulniers , Tom Rix , Miguel Ojeda , Sami Tolvanen , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Dmitry Vyukov , Alexander Potapenko , kasan-dev@googlegroups.com, linux-toolchains@vger.kernel.org Subject: Re: [PATCH v3 3/3] list_debug: Introduce CONFIG_DEBUG_LIST_MINIMAL Message-ID: <20230811153357.3cdfdbeb@gandalf.local.home> In-Reply-To: <202308101259.D2C4C72F8@keescook> References: <20230808102049.465864-1-elver@google.com> <20230808102049.465864-3-elver@google.com> <202308081424.1DC7AA4AE3@keescook> <20230809113021.63e5ef66@gandalf.local.home> <202308101259.D2C4C72F8@keescook> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_123403_439979_F59FF7E6 X-CRM114-Status: GOOD ( 19.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 10 Aug 2023 13:11:58 -0700 Kees Cook wrote: > > [...] > > + /* > > + * With the hardening version, elide checking if next and prev > > + * are NULL, LIST_POISON1 or LIST_POISON2, since the immediate > > + * dereference of them below would result in a fault. > > + */ > > + if (likely(prev->next == entry && next->prev == entry)) > > + return true; > > I'm not super excited about skipping those checks, since they are > values that can be reached through kernel list management confusion. If > an attacker is using a system where the zero-page has been mapped > and is accessible (i.e. lacking SMAP etc), then attacks could still > be constructed. However, I do recognize this chain of exploitation > prerequisites is getting rather long, so probably this is a reasonable > trade off on modern systems. A totally hardened machine is one that doesn't run ;-) Yes, hopefully that when the kernel is configured with HARDENED it will eliminate steps to a prerequisite attack. I'm sure enabling lockdep would also help harden the system too. But there is a balance between security and performance. The more that adding security harms performance, the less people will use that security. -- Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel