Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1620083rwb; Wed, 26 Jul 2023 15:54:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlEp8K5E8CJNEaFFu0zuYn/NMfOklfAjwTeoTmaWRM3l518WenUc6Cc2n4y9Zo8YNUfE6oIb X-Received: by 2002:a05:6a20:5487:b0:137:3b34:93e5 with SMTP id i7-20020a056a20548700b001373b3493e5mr4490578pzk.59.1690412067616; Wed, 26 Jul 2023 15:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690412067; cv=none; d=google.com; s=arc-20160816; b=szWTMB04gD5Y2J/1RwMyiVFdj4ArU1Kz90s9/ELhhJB40JcBZBtquWRL9gyfhZLv3j EAoz1ZT2KX8RfBxH5Lbp4wf96z4G+RM1tPuPnUA+59A6Evl35EqtOzvAXv/DJkMOpWv/ 0gB1N7oIUTxFv+mJWbyrYz4jLQx+IQ83+Z2WanC7kL5EljCVFqmdQxEJYQFsLlMXA2Vh vBw8jM+lXuOSe9QuuC0ItiPzF7iB6IdI4M1Q18i81D4M0zs9NbDckoHEn/DRL00+wOjw +yY761shLw7gL9er2eYMrXmeSCnKUzdDQXOwcO0bLoK6m533w6mZTEhngfdA0yDCk1Q9 eWbw== 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=yTnTPyUChx0sAwZF2MNrXaeFAkRzkrBXS0aTBLLDPZk=; fh=8xj0SyyzNPX1XR6wqlX7KeWjlQzSkPXKrittH6L01MI=; b=BUPEMa/tnOJYUTpuW2hddG4XRj/PhQ5Kq+5LzCXHUs2uTpvPOTYfMUyzdaad0k74EO Ri1rcEIiOWmq83rGp5vCWyK1ipzDyFFVAq/GmffQ+4DAz9c5uuRnS44TA14NmPazOtxM 3pGo5IEIBlHTsDLFRewVBgbc9Mub4iWG9T49oVs9gajhxlKOO0mIdJNL7Lbesq94QgTq yM1ZXibfz397/M8KFjNFbx3bNgyUT4h3dZVZiCGfXU+qI3JUVTOnNQUdOeVRb7jmrjbq ZRrVsWq+AHktKBxSZ7NUkoHCO7YdjEkE1mGI40XTgibECLT7rlr4o/Mk2CCfucGGgTYq /8oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IWcOTkAi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g123-20020a636b81000000b0056385a32757si24580pgc.797.2023.07.26.15.54.15; Wed, 26 Jul 2023 15:54:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IWcOTkAi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbjGZV4T (ORCPT + 99 others); Wed, 26 Jul 2023 17:56:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbjGZV4S (ORCPT ); Wed, 26 Jul 2023 17:56:18 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98E671BCB for ; Wed, 26 Jul 2023 14:56:17 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1b89cfb4571so2169825ad.3 for ; Wed, 26 Jul 2023 14:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690408577; x=1691013377; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yTnTPyUChx0sAwZF2MNrXaeFAkRzkrBXS0aTBLLDPZk=; b=IWcOTkAilfjO30aVduyx1ux6dmmPLPp6fYwqMlinVp/BNgslgirUI3K6QQoyv1r6DD sHjD3GPv76lR4SgFTkxqc7vxAWWLlkH+eiK+gDlw64nGIIYAI9Y1qvparPJGxBIDBb7D VGvlXJjMWhOa7FOFji6IA3pwQ77ikVyyRsGew= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690408577; x=1691013377; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yTnTPyUChx0sAwZF2MNrXaeFAkRzkrBXS0aTBLLDPZk=; b=DA0RwKmZpo0yusXC0ZTA7XN0LgafPuas1oSYBhJAnoLHYzbSAl6QLPC538lR8aJPQ5 kqGT8WkakstprZeWwPe61HlVF+WqC99+XqMzEDa/x5QETGDisZ5SCCH5TdXCjU5qH/yE pojVKy4JIA5ErmvccPL5vvxH4esGp5WtnxV4vnpAHQIPlUrXiutpn0HPgjGn0vYmel9Y aa87EB0dhy6GNR1WEs3cPl8tfSsNhpEgLo1DQWjFJERtqh132G2tyZZDAe6lZnHjMvzF DdAAGvGHh7IGpMEM9pNhyFE9NfLAzZHOlDeXghom22WLwNrY69gviRaqjfZFHFuNdyAT TVbw== X-Gm-Message-State: ABy/qLZlpVoFz8b2JoW9+tzt5ZvFy8V461LcD7QCv6iCpLTjyGCwlPMh tOAy85YpNbzRn8jq4pkw6hlVtg== X-Received: by 2002:a17:903:1cd:b0:1bb:7d2f:7c19 with SMTP id e13-20020a17090301cd00b001bb7d2f7c19mr3117909plh.64.1690408577108; Wed, 26 Jul 2023 14:56:17 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id v5-20020a170902b7c500b001b5247cac3dsm32637plz.110.2023.07.26.14.56.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 14:56:16 -0700 (PDT) From: Kees Cook To: Hans de Goede , Kees Cook Cc: Larry Finger , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] vboxsf: Use flexible arrays for trailing string member Date: Wed, 26 Jul 2023 14:55:48 -0700 Message-Id: <169040854617.1782642.4557415464507636357.b4-ty@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230720151458.never.673-kees@kernel.org> References: <20230720151458.never.673-kees@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Jul 2023 08:15:06 -0700, Kees Cook wrote: > The declaration of struct shfl_string used trailing fake flexible arrays > for the string member. This was tripping FORTIFY_SOURCE since commit > df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3"). Replace the > utf8 and utf16 members with actual flexible arrays, drop the unused ucs2 > member, and retriain a 2 byte padding to keep the structure size the same. > > > [...] Applied to for-linus/hardening, thanks! [1/1] vboxsf: Use flexible arrays for trailing string member https://git.kernel.org/kees/c/a8f014ec6a21 Best regards, -- Kees Cook