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 74555C001E0 for ; Thu, 27 Jul 2023 16:00:59 +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:MIME-Version:Message-ID:In-Reply-To: Date:References:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QHW7pPrydzwreEPVYHDfcTza+9F3c0fxc/AgNI4Ry68=; b=1W/o7W7t5KiiVq 8RZ44PUvg7gNOB5rGq6lEtoUAbYR7CZm8t7CET6NTk/6LWCowVbMRltyrpPGcq9N/rnS3q9h2GIsK JX0XUiUu/G2uRjPJdb+CzOxxC/toogtQVTh/RaKzAJxcN7TQt4Zi4C9/gmhXtxCHv4Q69WwI8H2Wa vB0axLVOB+QFdAtdrGGRpm6u4D9KeCZ2FuM7pSboRhqbSK0ethOcfdZr8o600Kn2Jytjxvsjva7rj LSWDnztCZxnyPrGoKd5rAZPso9YPP3zpUezIJ2aqc2cvqrt2XZR89owKo49sZag3VQZr1g/CH/oNq d8aaWv/CnpeDWPU+3UNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qP3Po-00GFX0-2s; Thu, 27 Jul 2023 16:00:36 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qP3Pl-00GFPk-1g; Thu, 27 Jul 2023 16:00:34 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3E44761EC0; Thu, 27 Jul 2023 16:00:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F90CC433C8; Thu, 27 Jul 2023 16:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690473626; bh=f5m8BGhtN6zBxnVwJ+ho2scIqcjIJySmiEoYp/0u46I=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Zx+nPrzkjVwYmOzLqBoOHudWiVte0aG41ndPOdr+LiYIMiXAAXXEKSP9pDuEG2y5L nmN8Kpd+cv43df4ijqgds7+65i0cNIIyPsv3E8Xo9vPPe1uFXsHSRtGd3wD9t9PwxS Q/Ym0Z8LxRYzEe1vvAUsmrl5tqV8dsf+KqVh05H9dFZ2tHUSToEOrh3mI5o9VW6RZx 2X324IRq6rXWvu5t4cgcR1uLxO+IYzawNauV2VddPtVPq8NATjY20WdsCzogEkewHP bvEpJvlQpy7iEQ+VtKQt8RcZLTpbG0YKfcbSjSj30R20IT802X/OWcGrK7HT6sZvT9 Wic+BgtEgdKYw== From: Kalle Valo To: Kees Cook 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 References: <20230703181256.3712079-1-azeemshaikh38@gmail.com> <169047317159.2400214.7882697833368890001.b4-ty@chromium.org> Date: Thu, 27 Jul 2023 19:00:21 +0300 In-Reply-To: <169047317159.2400214.7882697833368890001.b4-ty@chromium.org> (Kees Cook's message of "Thu, 27 Jul 2023 08:52:55 -0700") Message-ID: <87tttpz6ne.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230727_090033_622798_7A194304 X-CRM114-Status: GOOD ( 10.31 ) 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 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. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel