Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp631181rdb; Thu, 30 Nov 2023 14:01:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFie8MpFsGteW8T3nizIJ6C4H3P9est6pQkt9xqe20+WrVAWwl3Q6hT2RvUVqryVVKuZ23b X-Received: by 2002:a05:6830:1017:b0:6d8:4b43:bdd3 with SMTP id a23-20020a056830101700b006d84b43bdd3mr945811otp.22.1701381702580; Thu, 30 Nov 2023 14:01:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701381702; cv=none; d=google.com; s=arc-20160816; b=eEARiwuJfyW9CEMsRIGcxj7PyZW0voolW6mTgKD7X/3ysYiF8oMPoT+MRTA2nugwen QKqUsL8EJUcdN7ML8DQX5bXL/USwYpeB59aSmYqHrpuX96XfpdpqyoR0nUqzVVY8miEs 0ZqSCCZ4hdAFY99KEMyw3LqfCNXUogs6+ZbzRutTROWu2f6yIcmftbOAdMmbrpVaEXVN G8nsAdjYIvcLG3WxAuEiVUBHSWnZBYYBzqZ0A3gaol7eq+lj5MJcmmn/zPIPU1KFubOF 7vSMM9qkE9nZc3jCMoMFAHmLuTGGqFQ0ZHRe5aUkIYvODkJmpj02ZxryX+RyplzFzgba ubRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dsnhXi2Np1/7AoJ4oiM3UjWdMUQBZrbcqrKbF2bClr0=; fh=fjOB3LTw0GQkasQ7oJK34CpwT4PXswoGYd5IK1NakzM=; b=PdZgt0M2vKZz7enkAITeINojJc+BCbIChb1lR8dfJF6QEEjVUYNUDEh/qhC5tskIpX pm9WFo7wss8Fmx3kNRFrYEZqPhje275Pvwxl+rEYefeNqZjiWG+V18jDleHINV/ifwZK 1uVodMq2iASABMuMrubrfrQJNaC4GKzz8QMHNcrcY7ZjIcAvcuniZaePXZdNHapyLG9+ 21UoJnerxK0o0qOwjm8u5OnKb2kK8zC0P0FDUY/XOcdOETfEXFzmmK1zrJ+BRNkGzSSY 35xJQvapmPIG6K2KQE25I+bFzO+e0kI8yJamVF/qYY1h+jAjlpAUzZHEBYrivthFBQiO IQsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BXMttHti; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id z10-20020a9d65ca000000b006d850cdbb4csi751114oth.134.2023.11.30.14.01.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 14:01:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BXMttHti; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 8483A80EAB09; Thu, 30 Nov 2023 14:01:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377155AbjK3WBO (ORCPT + 99 others); Thu, 30 Nov 2023 17:01:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377177AbjK3WBG (ORCPT ); Thu, 30 Nov 2023 17:01:06 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8955A1711 for ; Thu, 30 Nov 2023 14:01:11 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1cfc3f50504so13494975ad.3 for ; Thu, 30 Nov 2023 14:01:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1701381671; x=1701986471; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dsnhXi2Np1/7AoJ4oiM3UjWdMUQBZrbcqrKbF2bClr0=; b=BXMttHtilstQ1Pgl84rIJWvWUXYITk1NTityektpvf/XoZoUueRxx4vr466V1/1cxt D27nUjhnUDQ1csuQIah1d55MSvahy5LvOUvG1J7OG1h9LI+MOIdgRXRXUPNcqXMfdWpF l9wzdwD2o18IRFHirmRP0ZN4vyaSiTrO4AQqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701381671; x=1701986471; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dsnhXi2Np1/7AoJ4oiM3UjWdMUQBZrbcqrKbF2bClr0=; b=M04+YFzVtJBXcXra7aYr47BLLDwgvWh5bmI2xl8g4sQ196depbopWGvxnYVYeWIOpR nUTMNAUp2m2Vi8aZFHDg+T6U7o7xpz7X5LVaRWQfo9LyBNDEYIDyqitJ1XBHeFORDGMK 0x8JZFBQ+iTXFhHAPm4cenaekC0kCgS04Q/YaxyBgtMsw0xfesZB7XJMXeXSjXeeY8fk f6Zno0pKfOgJoX81uevNdfWpRr+gJaJ/v5PR0GJmpWwMoYQLFJnw3joH5CxthUGjc7fX Vxvxn57RjiLIsJIL6XJm6KuA42sL3ScWZJNg7+vfr/0kAAkvO5csiypQvpH/y0pwg95N fAJw== X-Gm-Message-State: AOJu0YwjQFEwobL3S7MHMI6o+ESGlm7RyPnVmQAHwJSIwakUgRvJ250B L0QVRxRSK/5A3J6QEuBtQExaEQ== X-Received: by 2002:a17:903:244e:b0:1cf:de3e:e4df with SMTP id l14-20020a170903244e00b001cfde3ee4dfmr15071465pls.58.1701381671024; Thu, 30 Nov 2023 14:01:11 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id l3-20020a17090270c300b001cf6783fd41sm1911702plt.17.2023.11.30.14.01.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 14:01:10 -0800 (PST) From: Kees Cook To: James Smart , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Justin Stitt Cc: Kees Cook , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] nvme-fc: replace deprecated strncpy with strscpy Date: Thu, 30 Nov 2023 14:01:08 -0800 Message-Id: <170138166766.3649510.14295562251346849867.b4-ty@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019-strncpy-drivers-nvme-host-fc-c-v1-1-5805c15e4b49@google.com> References: <20231019-strncpy-drivers-nvme-host-fc-c-v1-1-5805c15e4b49@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 30 Nov 2023 14:01:39 -0800 (PST) On Thu, 19 Oct 2023 21:34:35 +0000, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > Let's instead use strscpy() [2] as it guarantees NUL-termination on the > destination buffer. > > [...] Applied to for-next/hardening, thanks! [1/1] nvme-fc: replace deprecated strncpy with strscpy https://git.kernel.org/kees/c/f62cacf390b7 Take care, -- Kees Cook