From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8532C0015E for ; Thu, 27 Jul 2023 18:02:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iQnP8UAMX0Z3EG5PDby0moD1QV3mf0uU2639zAAw4Ng=; b=OHhRvdc8q/dsJ9 08SLs/3I+2g15MoccZCRpXcQI3TPqRAH4ihsIpfLFpM+55Pl0Oy9KPp1jWxo1mcyDwDIrC9gPoWT6 DxvsYsAWYwmKto6nRONcMs1P3L38ezx5MyZZ6q7tEn/YXM3SxEcPB1gzohcVX0AoIWPm9YOEwPquZ n1fJSrYDaD9iwes5Hs3lkvXDbRQJnM84NPiSGbjBMstILOpN2jYxgX9ZqUK3mE66592G0OSH+6WOZ tZ0ZzADHIjqXjMhQstE/jDzTWJ/qa1FBMutquwX4esGkwaahom22Ub+sEv5RhlvojIQw6fBrTCXbb r/q8lpqGsF2gt9UyvT2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qP5JS-0005WE-0Q; Thu, 27 Jul 2023 18:02:10 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qP4Mv-00H1rz-2C for linux-arm-kernel@lists.infradead.org; Thu, 27 Jul 2023 17:01:43 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-686fc0d3c92so507079b3a.0 for ; Thu, 27 Jul 2023 10:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690477299; x=1691082099; 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=NrdhbFq2TllUS3d1FOZRRA3ctMM7rEJWO6QWxhxN4X0=; b=gwKxjNrjlnXnzgiB40rgMiBl0/QtgC8VUcyszpZozy4dcwVgAWS2E8bfdp7c2YpL2f 5K1p3ziPEsFBp9RabGxDWzD4SQH6S3e8EASPNAMSMVBUt0T7osetBpBmUJH8w16wFkCj LSWPtmArmmchxRrkcE2YLqO7umBc5u/VxmrX4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690477299; x=1691082099; 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=NrdhbFq2TllUS3d1FOZRRA3ctMM7rEJWO6QWxhxN4X0=; b=ZVvut+L5LPLY803jVtLTX1ntk1ebuvnZltJQXwGLz7rt2dVVWPr6DgYRk1lE5mFPwB ZJgCy6dEXGEruef/xHOnlSLYQ8xawADEYwfkupXwld/EkXgOHuqf2tOACfL2k7hN11Cy bhOALPqHhs+XOYOtFx1Xdfmf6xld/JN1fhGJEgCA1S1m2oJxvgpisFLr+NrS475UKg1k VK/IISj1poebkZFGseF9N3AKL7LFRrgLrakHAlXlbQ01gvXKj2jRlFiWoH6vW7Jz+pUI 6sUG9HVghKN3fUv/sFkYfNB9bgZVIYJsUm+O2cl7yTcZ/ijNGuI+eclvt/S2hZb45Kbq tUcA== X-Gm-Message-State: ABy/qLaaTZ6u1RnlThWjFAgr+EcX3XUU7c7hT1x9FNfDXLTchhslywIg GY1q58bU2GtWxgrkjWXkLst8sg== X-Google-Smtp-Source: APBJJlFApVlNeR4dyVr69s6M57WJ+jQYcGl2/Dm1rae4njEHS0rUSMH2qUw00/brVLWB60QevPBe0A== X-Received: by 2002:aa7:8894:0:b0:66c:2d4e:4772 with SMTP id z20-20020aa78894000000b0066c2d4e4772mr6049993pfe.13.1690477298723; Thu, 27 Jul 2023 10:01:38 -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 z17-20020aa785d1000000b006829b27f252sm1766012pfn.93.2023.07.27.10.01.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 10:01:37 -0700 (PDT) Date: Thu, 27 Jul 2023 10:01:37 -0700 From: Kees Cook To: Kalle Valo Cc: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Azeem Shaikh , linux-hardening@vger.kernel.org, Shayne Chen , Sean Wang , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Matthias Brugger , AngeloGioacchino Del Regno , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH] wifi: mt76: Replace strlcpy with strscpy Message-ID: <202307270959.900E3A345E@keescook> References: <20230703181256.3712079-1-azeemshaikh38@gmail.com> <169047317159.2400214.7882697833368890001.b4-ty@chromium.org> <87tttpz6ne.fsf@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87tttpz6ne.fsf@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230727_100141_845317_19393E50 X-CRM114-Status: GOOD ( 15.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 27, 2023 at 07:00:21PM +0300, Kalle Valo wrote: > Kees Cook writes: > > > On Mon, 03 Jul 2023 18:12:56 +0000, Azeem Shaikh wrote: > >> strlcpy() reads the entire source buffer first. > >> This read may exceed the destination size limit. > >> This is both inefficient and can lead to linear read > >> overflows if a source string is not NUL-terminated [1]. > >> In an effort to remove strlcpy() completely [2], replace > >> strlcpy() here with strscpy(). > >> > >> [...] > > > > Applied, thanks! > > > > [1/1] wifi: mt76: Replace strlcpy with strscpy > > https://git.kernel.org/kees/c/535c78cbc0c4 > > Why did you take this? mt76 is in active development so risk of > conflicts is high. There didn't seem to be any further activity for 3 weeks, and it was a relatively mechanical change. I can drop it from my tree. What's needed for it to be picked up through wireless? -Kees -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel