Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4807013pxj; Tue, 22 Jun 2021 08:25:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+IlVfBu+DJWoa1kxOdKYXtxaAbAZA000+MD4APSB5kJd7hBL7IqVJy5TTqE3Uu+Ze56rk X-Received: by 2002:a17:906:7f1a:: with SMTP id d26mr4509345ejr.449.1624375547052; Tue, 22 Jun 2021 08:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624375547; cv=none; d=google.com; s=arc-20160816; b=Fp3PTVDiCUWNx7u31mD9iocb9W+Pzga5KIPPi/6jJ8G2VA5jxgfoVt3oSKKcQRZeFS eED0UdPXW8rSyMCZJTHZNDoGFnComcPlxPS4+t3NjBXhUg7QhmmbmdR3kya+AG+bzJQy 5PCzSnBqQCdgexQfmIgNRnDjFn/e/Jn68sA0ao5JmyqoRxrzJD2ztZNw3mzLKgA58RtS XW/ig1QdnDNIJyYbRKOjM4ExAAVfaoUEge+lBQz/KyrxXoV02gKY8EoIcD/Qv/kYpn6r s2thJHVVZG7qZgia6ATxQhFP93wqU/9zz0dMvCaiZadv6fhMTvOgl8PpoxriAEEq1igS +lgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dmarc-filter:sender:dkim-signature; bh=HAS87M3nxs9uoFOR7nCyuKz9APa+x88LkbPn3mBt0P4=; b=fbHNa1kQbUfAlLL0hCLCTLmRoRqlITz9EKpn6vYgL/NWiRuy634fw1+R/vSTKU5CwX +y5NXZ30NvvevHGxnqIOT1zKCMzUD1FN5u16BlJDpKgXU8UlBzdIhFyTcWihoo1lCHdx NwlDh9Hj2quOcqreNDVvA2usm/+ogNWS5+WhNTo/PhVCJgRiyiuz0ek7djLt8ARohvG8 2BYSUB5mtrCyXrqJbtxspf3eEvgAiJzy7MbMG52rjt9XBQ5VOku56s71zHbDAn3LU89g 1KzsMyzcbPxQp+XMPgpy5Ier695HgBTTZ1okdqTh5hB9zO+Yse1ClnQHblNMuh9FgCOy LOKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=QcutoBCk; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si20129744edw.130.2021.06.22.08.25.23; Tue, 22 Jun 2021 08:25:47 -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=@mg.codeaurora.org header.s=smtp header.b=QcutoBCk; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232297AbhFVP1P (ORCPT + 99 others); Tue, 22 Jun 2021 11:27:15 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:14411 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232258AbhFVP1O (ORCPT ); Tue, 22 Jun 2021 11:27:14 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1624375498; h=Date: Message-Id: Cc: To: References: In-Reply-To: From: Subject: Content-Transfer-Encoding: MIME-Version: Content-Type: Sender; bh=HAS87M3nxs9uoFOR7nCyuKz9APa+x88LkbPn3mBt0P4=; b=QcutoBCk8NDFyU1/zSeun+sQWOBdOuQ69pZU5XK+0sINzL2DduaRnhUAaHl26ippzFm+7ACa HfG2IB35OfKSyXIZce7J+cjhS6+fmCD9tjlK7iVq/ofZ+a59TKFOy3W6JMx1outxLG3wVUNa k43Z/ShtOVsWqO1+WSCfgcnAc/w= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-east-1.postgun.com with SMTP id 60d200bb62f3f07b5379408b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 22 Jun 2021 15:24:43 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id EBE91C4323A; Tue, 22 Jun 2021 15:24:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,BAYES_00, MISSING_DATE,MISSING_MID,SPF_FAIL,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from tykki.adurom.net (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1CCA3C4338A; Tue, 22 Jun 2021 15:24:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1CCA3C4338A Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] rtlwifi: rtl8192de: Fully initialize curvecount_val From: Kalle Valo In-Reply-To: <20210617171317.3410722-1-keescook@chromium.org> References: <20210617171317.3410722-1-keescook@chromium.org> To: Kees Cook Cc: Kees Cook , Larry Finger , Ping-Ke Shih , "David S. Miller" , Jakub Kicinski , Kaixu Xia , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-hardening@vger.kernel.org User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-Id: <20210622152442.EBE91C4323A@smtp.codeaurora.org> Date: Tue, 22 Jun 2021 15:24:42 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring array fields. > > The size argument to memset() is bytes, but the array element size > of curvecount_val is u32, so "CV_CURVE_CNT * 2" was only 1/4th of the > contents of curvecount_val. Adjust memset() to wipe full buffer size. > > Signed-off-by: Kees Cook > Reviewed-by: Larry Finger Patch applied to wireless-drivers-next.git, thanks. 0d5e743db480 rtlwifi: rtl8192de: Fully initialize curvecount_val -- https://patchwork.kernel.org/project/linux-wireless/patch/20210617171317.3410722-1-keescook@chromium.org/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches