Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1585973pxb; Fri, 20 Aug 2021 08:58:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7GnzIA1/dfpB1WNSxdTULicnCgKwx2VFfXTt5K3d+h9IT5hxP8pbREcmMJgewMjmoMGsD X-Received: by 2002:a17:906:4cc1:: with SMTP id q1mr23086435ejt.415.1629475105639; Fri, 20 Aug 2021 08:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629475105; cv=none; d=google.com; s=arc-20160816; b=RODNWwkruE9+wmjDlXnfW6t2HA8PCw+Y3r7htQDPXdjF5wsD+KlKszX0/m/CfZR3me Gf2WssE81OIvogFYxINwV/Ivv4mW6KPvvFpppE8aYY8zNKUSjCt1Is0R6f/rFt/0lE1B eb4BldIrVW4q5Hv9ciMzUJj07iSxM9Y12AxARTS0KnWYY2UpBtP5DbEKL0O4hlXGMOYL klqJOMaZz3vPzZObc+ya6iWp6OGh5hok4IotWVPGM0MxMwKe62/hciYbpjB1FqCSSWyY hvemmCbyA1fTT9r9BwDjFnv558H3L9SWF4vrbgpAbi6Mao8+H1yXKaTe0dvrNEIe/t25 HOtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AJeoq+Z5WucmTQVKUtIcwcvIvzIMIDi7YIzeoCuQoP0=; b=0rLXSvVcfVn3eUyEfyhasn07nPwweicd75/6RdhQvBWAsM85kE1WSbZPPRcnkqtYWz xMbN3mSNtM1oHZ/uQvRR9Ql5s0/7kB8cgqnqq5dYliSInWMeGnJFG60fWD1/HwbOVPrV 05j823Diub93MWgUUsRsbCd6YrP0qDaiyBuboH1pGBz9LcvXfFI8i/qqHuOp1TR1jV3u j4hOxXMZ2bhTB69e/MPW23pMP8/Ut+LIMEHs5UY6PgMHhf3Ul+197vVqvYl/Sua9fgdG FCVoSDotfRBll+9r9044ai176EAj3yK0JaRnHuMigG078Z513pJf5licI4ukVz3Xhbqq X7Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oIxFw+GW; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d13si6608960eds.452.2021.08.20.08.58.02; Fri, 20 Aug 2021 08:58:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oIxFw+GW; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 S241384AbhHTP6H (ORCPT + 99 others); Fri, 20 Aug 2021 11:58:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241313AbhHTP6G (ORCPT ); Fri, 20 Aug 2021 11:58:06 -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 6E448C061760 for ; Fri, 20 Aug 2021 08:57:28 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id u15so6156122plg.13 for ; Fri, 20 Aug 2021 08:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AJeoq+Z5WucmTQVKUtIcwcvIvzIMIDi7YIzeoCuQoP0=; b=oIxFw+GWAwZs8paucH0s/In4m5BgJDLq+dmzX+m7YKc4gCfgmo4JI2M4BsORRDjuci qAYG9G5n+7RQUkylKMqlb1PMW/ybYfuvOAKQsZeE3AgNOJAe0FYCQwED3j3ea2q1qoXd 5B7pTsEFDxH8oJwSmaEr+SvpFW0GYanuTjebY= 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; bh=AJeoq+Z5WucmTQVKUtIcwcvIvzIMIDi7YIzeoCuQoP0=; b=jvEYtYpIelLMoT6WrgC07xFnJoAwJkEd1LLO7BNHhy3rPWz6eaSaOdQ/ybcHiF+3DS gFOKLg24REfwkof0KTvHbe1DAF8WYTCTuz/q/HGg038rb4YoRMXSI02zo0ijEmpiUG+1 2/AqfEaId8GAnz2hRGwh2imJpoiALd7H3WJDSlUn7cSHM6Qc872UHKpNeXL6Oc/8uCSX F2nT6Nu1ptG9w+i5f/rIe6nYnAPKyIB0MZvSP3/aQ9s6aoJS9R3JUxVXBioq5KYT7UEb lv3BoAHze6MXf5dj19MCYajLGSxR69IapujzU4j1IfsATIO4msp1xG5LA3mn/sLQ6GdW lZlg== X-Gm-Message-State: AOAM532cayKhj9NxwDwsB2grba7+jD90WiaUt88BedUaehd6vRzlIpQc 0bpQIllkh9tNhXSxYZ2jCfWyZg== X-Received: by 2002:a17:902:c215:b0:12f:b1b6:9f07 with SMTP id 21-20020a170902c21500b0012fb1b69f07mr7880820pll.82.1629475048022; Fri, 20 Aug 2021 08:57:28 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z20sm7604377pfr.121.2021.08.20.08.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 08:57:27 -0700 (PDT) Date: Fri, 20 Aug 2021 08:57:26 -0700 From: Kees Cook To: Jiri Kosina Cc: LKML , Stefan Achatz , Benjamin Tissoires , linux-input , "Gustavo A. R. Silva" , Greg Kroah-Hartman , Andrew Morton , linux-wireless , Network Development , Maling list - DRI developers , linux-staging@lists.linux.dev, linux-block , linux-kbuild , clang-built-linux , Rasmus Villemoes , linux-hardening@vger.kernel.org Subject: Re: [PATCH v2 55/63] HID: roccat: Use struct_group() to zero kone_mouse_event Message-ID: <202108200857.FA4AA13@keescook> References: <20210818060533.3569517-1-keescook@chromium.org> <20210818060533.3569517-56-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Aug 20, 2021 at 05:27:35PM +0200, Jiri Kosina wrote: > On Fri, 20 Aug 2021, Kees Cook wrote: > > > > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > > > field bounds checking for memset(), avoid intentionally writing across > > > > neighboring fields. > > > > > > > > Add struct_group() to mark region of struct kone_mouse_event that should > > > > be initialized to zero. > > > > > > > > Cc: Stefan Achatz > > > > Cc: Jiri Kosina > > > > Cc: Benjamin Tissoires > > > > Cc: linux-input@vger.kernel.org > > > > Signed-off-by: Kees Cook > > > > > > Applied, thank you Kees. > > > > > > > Eek! No, this will break the build: struct_group() is not yet in the tree. > > I can carry this with an Ack, etc. > > I was pretty sure I saw struct_group() already in linux-next, but that was > apparently a vacation-induced brainfart, sorry. Dropping. Oh, for these two patches, can I add your Acked-by while I carry them? Thanks! -- Kees Cook