Received: by 2002:ac8:45c5:0:b0:405:464a:c27a with SMTP id e5csp1269752qto; Thu, 27 Jul 2023 09:24:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlEfIZlGfqEMt9qeLX3BgL0tYvVU1mJOPBlB4nCAx/SbSA8tTa0BC8GaT5rz2IHfZh2cKqwk X-Received: by 2002:a05:6a20:4295:b0:133:80c8:7a9b with SMTP id o21-20020a056a20429500b0013380c87a9bmr6263010pzj.9.1690475088794; Thu, 27 Jul 2023 09:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690475088; cv=none; d=google.com; s=arc-20160816; b=p7PQWnc9P4UlrGU3cVhXEiGt56OBK5dTkz67vsTtg12k1qeTx1mGkV+y/nIvSaEygn FSGHZjiw701EDE3JWZR7FmdG+lv8miA/p9jvJ0mNwdwxIPb1rMKFjWE2L/FbqhpdgPO7 LM40+LqQN3ZtKNUR6M6uKxTUj9Xl9UBDQoaACHdrRq9DqI8rriH6P567wGnMIcIlLOIF K6x5iftVMCoLjfA67UYk5rYHPKRKW59e15bkayrbsdDHYJhXOywikKIXuQrrqXZVtgqV tlgJt7sEn1lYmwTgoJdYJeihfS1hg6aYrCEfFtam94LTXQSYbBAaJAxZ0YEY/btPi8QG +ctQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=m7xD/b2zXoVi2142ffeDqJxaXunwLjE0S3OAqX024WM=; fh=IJ3bekLM18loQGaZVqn+DEN+bFdakknwKkHX+0xtSfE=; b=T4a3lK8UO5AI58G9FoplG8Ef3AfD2sa6MwHPMeVRzLZx62nfdJCuASyiAWUaQA+8EP jvAhzPAcXF+RgyBLKOm77jRBSAEfGP/bRWk7w6R/A2SYyH3UWg2W5Qf2I8g2U+3OLEvQ exW3EgAxhq2k7sv6+6LNBG4VzKqk3dLAqf/6f+t9nhl9yJKri4CAAyhwz8L8qXmdcvuK T1zWdylcw8hytZSev83yh5xza7EHVYqVb1LAB4OG5bvJNmV4WAGducFWDB/z+p3KvlHL oI2sRoIO2m6TzW2WS9VqtQajrpdcUyDocl3TTTzh2fhXITvGru0eK/VlHiBu1ceXknuy K6hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h1il80sc; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y21-20020a056a00191500b006825e062715si1625403pfi.228.2023.07.27.09.24.36; Thu, 27 Jul 2023 09:24:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@kernel.org header.s=k20201202 header.b=h1il80sc; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232918AbjG0QCk (ORCPT + 58 others); Thu, 27 Jul 2023 12:02:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232021AbjG0QCi (ORCPT ); Thu, 27 Jul 2023 12:02:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CA2E30E8; Thu, 27 Jul 2023 09:02:36 -0700 (PDT) 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 D65AE61EBA; Thu, 27 Jul 2023 16:02:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E97BC433C8; Thu, 27 Jul 2023 16:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690473755; bh=q5mETferSRGLwrNdOWNUESPMpdTdxLeCdKKRjZZCd+M=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=h1il80scsWCuQ64co6z4Ep9iBudgtmt8tkWPPLDS4ViHeaVpGiJi7OCd+xBOWef8w 7PW50yrHVRCdSsXPJDxpX6XsF3KhZdnh8Nq+YDbKfLGxtXxuuriJ9Zth30iETDEVsU 9DTSgksTiDLMkAzIm9uSbcWB4YkeQYhQPPM2+CpDVDZAMmG9xP39YYfTfDPkZ5Gwu7 pUXPjqkPMsta2gBkR3zokTpPFj6q+SgTlnMBgV9i3ONnQc5vWM2Vihq/CCZMtkJi1R sdEOK8yVhhjOWue6K4qHTn7wx4N56KJPlIxuXNYebnPx8AFIPdyycV2dLeA44Kf0yn +3wGO5c38EQHQ== From: Kalle Valo To: Kees Cook Cc: Amitkumar Karwar , Ganapathi Bhat , Sharvari Harisangam , Xinming Hu , Azeem Shaikh , linux-hardening@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] wifi: mwifiex: Replace strlcpy with strscpy References: <20230710030625.812707-1-azeemshaikh38@gmail.com> <169047317161.2400214.15246406234885315012.b4-ty@chromium.org> Date: Thu, 27 Jul 2023 19:02:31 +0300 In-Reply-To: <169047317161.2400214.15246406234885315012.b4-ty@chromium.org> (Kees Cook's message of "Thu, 27 Jul 2023 08:52:56 -0700") Message-ID: <87pm4dz6js.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-wireless@vger.kernel.org Kees Cook writes: > On Mon, 10 Jul 2023 03:06:25 +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: mwifiex: Replace strlcpy with strscpy > https://git.kernel.org/kees/c/5469fb73e96d And the same question here, why are you taking wifi patches without acks? And this already fixed differently in wireless-next so our trees conflict now: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git/commit/?id=caf9ead2c7d06fd7aa4cb48bd569ad61db9a0b4a -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches