From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="lZz9CcOG" Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C82099 for ; Wed, 13 Dec 2023 11:18:20 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1d0b2752dc6so64959035ad.3 for ; Wed, 13 Dec 2023 11:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1702495099; x=1703099899; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=P4zCTjl8Zj5OEvodPkRWE7USQTKPwsDssLjsj8FI8bA=; b=lZz9CcOGQ28jt/M2KoCb8vMde8vGPhufwRb8bQuaSl436TZ9tXXsG9DAgyUwShg/Bn DSaROe7fmupWCKjwUTHAIa18mivqYHDb0JmqCq6i7MOQoDLZW6UGsJi3Tmd+eZotmUJE qlYgX3eIPGAIXsTXSS4MSFAkakwlxjQlqLRPs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702495099; x=1703099899; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=P4zCTjl8Zj5OEvodPkRWE7USQTKPwsDssLjsj8FI8bA=; b=H+vZk53HTW1my8GdRJQSX9hIWLQean5nt6LKcVTXzqEceP+pSRoD9rPUwOXyM1C5gK NyHu/duBqPB38N3qTmxcNAWYGPV7XY7EbGVutstoi5fu3ktjm+uRU80KbqdM0DyRy5Gd Heal2WdwySdsQp6eVjvvI1EKXvTu4ylYiNKC3DQCr0asTSIRr8VjU4IsKfxdWl0Cjr8U GnS9+i+qzXcQe55/8cCtWYNW77gZwY3FkR577qNFfE1lpt6EE832zwODWxrLfLuzrjPi i2qSRZtWmcKX8PZPmJLrX7GH6KjCB3NjL/0GHH1pi+9Bgjj+hnvLU5iSp4irenbUMoVW ZuPA== X-Gm-Message-State: AOJu0YxwK71IzDSzojA5XoV/Zh+aAT/OYsE/W7Os70m8iVPXgxZ43ZfV iB0GiYkyCfqhpg8SvWWdTJoZOA== X-Google-Smtp-Source: AGHT+IEydW4l2gH+402jkdTt5SLR7TQ0ZIFYTA0HY674vt3HsfTPJnNPjcvD142Vjxqu4HfEnqVnrQ== X-Received: by 2002:a17:902:e74e:b0:1cf:9c44:62e with SMTP id p14-20020a170902e74e00b001cf9c44062emr9894221plf.34.1702495099627; Wed, 13 Dec 2023 11:18:19 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id a8-20020a170902b58800b001d05bb77b43sm10882454pls.19.2023.12.13.11.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 11:18:19 -0800 (PST) Date: Wed, 13 Dec 2023 11:18:18 -0800 From: Kees Cook To: Anders Larsen Cc: Ronald Monthero , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2 0/2] qnx4: Avoid confusing compiler about buffer lengths Message-ID: <202312131118.F350E56D@keescook> References: <20231130205010.it.412-kees@kernel.org> <170241597608.164694.1762861756800879766.b4-ty@chromium.org> <12341921.O9o76ZdvQC@oscar> Precedence: bulk X-Mailing-List: linux-hardening@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12341921.O9o76ZdvQC@oscar> On Wed, Dec 13, 2023 at 05:43:08PM +0100, Anders Larsen wrote: > 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 Thanks! I'll update the tags. :) -- Kees Cook