Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5441482rdb; Wed, 13 Dec 2023 08:43:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNoTM6O+Lr0o52s9TK2EsO1Mqd3d6vzedD1EDHcrGVqVpHMQJL56vT+tYJXDlBdJ49qkWm X-Received: by 2002:a17:90a:a392:b0:286:6cc1:781b with SMTP id x18-20020a17090aa39200b002866cc1781bmr7352861pjp.94.1702485825910; Wed, 13 Dec 2023 08:43:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702485825; cv=none; d=google.com; s=arc-20160816; b=nn8cM1N7VCeiZdMB30UZLKhVgmEM092E5vGMTbDwygNMNY+on7DsVQ/GEH2PrtyD4H YmrVU0eta1Gbq/oyp2psOMTj1HMk4dDfQCOtwtD23rUCotJqIuEBrjmi6gaEQF6zzY2c btcYbZPbi/SeJCS2ndRR+K22G9HBjHUsb5DoaYK66Ks0SFFxWispgaUZJjZgPEynsbNa 86cAcQ83pSq9uBgukUxvT+m0CvermQxhRLV7wKPAIww8fhqUkl55PXzePZvktv1o+hKb GQglpIjeyvMrDlHJoTiN7hGR18rz2IeK9v470riQ64DOw1X2COKkRSeUCWmQ2EViPCup peZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=R+zOwHXfxGLUiGFVYN3h/JK/ygMXJQiQ4IPI6Z/ElbE=; fh=dSXgkHFBNmuGD3lZQN+UEUzmfc2TNWL2chTqAxs7zH4=; b=Kjhww7xYdvc0HHW8uJrsA5NUtDr/5LXoyIsR4aF0vYIXGHrRWBbqo8NQo0MkCE4GH6 MPMjZ3+gTaNh2EZfQej+uCHaW0MCP55HKo+rh4Wm4mE2M90tRCiogfbA8D1smE9xkjna xgUYekASNXUelXCt/wLmQK6JWIBbhWpAivcaloD2YSKYeDoks8jjQxVFjOxK+/tnx9/Y czu1Kc3hOsGgXAH2cu3JR3pdtlEmyJs/VuqZjv9GqZtk93AJiluAMR+ZrcbInS+UQeSL 9Rk4X1rS9F1XMKn+I5Zc2MIpqJY7eB3/WT7hdYEiVuRQXGQQSo+jp12Upq9tWfySIL6/ gynQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alarsen.net header.s=joe header.b="J/krViSp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alarsen.net Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id z15-20020a17090ad78f00b0028659a5d68fsi10924528pju.48.2023.12.13.08.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 08:43:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@alarsen.net header.s=joe header.b="J/krViSp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alarsen.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id F2C02802AA39; Wed, 13 Dec 2023 08:43:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbjLMQnZ (ORCPT + 99 others); Wed, 13 Dec 2023 11:43:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235350AbjLMQnI (ORCPT ); Wed, 13 Dec 2023 11:43:08 -0500 Received: from mail.alarsen.net (mail.alarsen.net [144.76.18.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF215182; Wed, 13 Dec 2023 08:43:11 -0800 (PST) Received: from oscar.alarsen.net (unknown [IPv6:fd8b:531:bccf:96:1d3c:7bb8:afc9:c861]) by joe.alarsen.net (Postfix) with ESMTPS id 3F50118053D; Wed, 13 Dec 2023 17:43:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alarsen.net; s=joe; t=1702485789; bh=R+zOwHXfxGLUiGFVYN3h/JK/ygMXJQiQ4IPI6Z/ElbE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J/krViSp5LGEjsvcsVeI7/JtvIMP9EyvgAZT8TqCRVzlCoGZOYj7griiHetYo8X6s SfKcfFH2D2tyI8iBkp4WldadooHOuLfCFhywNYLv5f3FByNcy5zbrRe/G12500cz17 yYIHT1qdEos3JgqVgHPS47E+jyD0O8rwd3OWeKc4= Received: from oscar.localnet (localhost [IPv6:::1]) by oscar.alarsen.net (Postfix) with ESMTPS id 16F21A7E; Wed, 13 Dec 2023 17:43:09 +0100 (CET) From: Anders Larsen To: Kees Cook , Ronald Monthero Cc: linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2 0/2] qnx4: Avoid confusing compiler about buffer lengths Date: Wed, 13 Dec 2023 17:43:08 +0100 Message-ID: <12341921.O9o76ZdvQC@oscar> In-Reply-To: <170241597608.164694.1762861756800879766.b4-ty@chromium.org> References: <20231130205010.it.412-kees@kernel.org> <170241597608.164694.1762861756800879766.b4-ty@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 13 Dec 2023 08:43:43 -0800 (PST) Hi Kees, On 2023-12-12 22:19 Kees Cook wrote: > On Thu, 30 Nov 2023 12:51:17 -0800, Kees Cook wrote: > > This attempts to fix the issue Ronald Monthero found[1]. Avoids using a > > too-short struct buffer when reading the string, by using the existing > > struct union. > > > > -Kees > > > > [1] > > https://lore.kernel.org/lkml/20231112095353.579855-1-debug.penguin32@gmai > > l.com/ > > > > [...] > > I'll put these in -next since there's been no more discussion on it. > > Applied to for-next/hardening, thanks! thanks for taking care of this (and apologies for me being unresponsive) If it's not too late, feel free to add Acked-by: Anders Larsen Cheers Anders