Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38924rwd; Wed, 7 Jun 2023 18:56:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ALCWn50t11IPwRehqUvWgd1k+xCeB8+e+OxQ+QfJipvRmU01CzFFXzOOnvrl5rsykIVTv X-Received: by 2002:a05:6a20:3c8d:b0:101:1e75:78e with SMTP id b13-20020a056a203c8d00b001011e75078emr743385pzj.14.1686189369567; Wed, 07 Jun 2023 18:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686189369; cv=none; d=google.com; s=arc-20160816; b=HEPA35nEk2UKMEYzLkZvB553cJQI0dHZm0rg6r8SnhC705bkx/H787Y8YGjgDddqIp fKJ/FO7VkeehGnNFUDgcZPsvLyr5uMW1xi81cR/b0fail2ijwHG9Eyw8gXNDgY0Dc2pE HI0A++1ZxLho17dPRR1N5QKGkmsGQezIXqiK85sLqM5pmmgIVLdOseFb7a/17GZUCjFs D9LW5UFUhhLHbBQlLtjrMMLjd/qK3/dq4Z4K5DffgNVEP5WxHngpoOUCb945QKwwKnwO AFtFaCcl2H5zxcRI8oe1ZEC8cY6leH1oBiSSvHZwtsKZE7Tb5k+270tqwNyLT5SNZig/ WS0w== 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=cFz6+wZYI+TVrIzl/sZbB16DgxboDPBIIftoZITFRek=; b=VhoANv1nzAtzHbHpMIeWA4l46vkZtpSHAr6iShcYM87LhCBjXgo6XQYZVqTgr8ysA3 lNYANbWPB+UrPEYtL0UDmiNRZUs/7xKutcGhpcOl3Bc6WBYDBhlqNnXdPxiImkIR9lVg xXIixprWBj1LP1rNvf6IIwNTo8CxtUt3ykt8kyBD9krVPxn9E3BXTJht3U77ZmXmLAgX OHQRF6bRVAz/7CNhXoQG3xR+j3VuKPtbzk9zGBa0xjJ4YvzNQSyFJAL1SsBJ7OTG4h/E 8TrgqFGKYJEZnbg57R1RMWyQoxq890NBaE8y4U7tmIjbawDOo6I+ZQ+IQwxRRBwkgP82 XuPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=yUd0gnw7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p9-20020a639509000000b0052868a865d4si165399pgd.553.2023.06.07.18.55.54; Wed, 07 Jun 2023 18:56:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@oracle.com header.s=corp-2023-03-30 header.b=yUd0gnw7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233257AbjFHBmi (ORCPT + 99 others); Wed, 7 Jun 2023 21:42:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230271AbjFHBme (ORCPT ); Wed, 7 Jun 2023 21:42:34 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FABC2119; Wed, 7 Jun 2023 18:42:33 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 357Mv4vR026210; Thu, 8 Jun 2023 01:42:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2023-03-30; bh=cFz6+wZYI+TVrIzl/sZbB16DgxboDPBIIftoZITFRek=; b=yUd0gnw7XxDrfkQI88fA3Kb6AfeqTetM+yimVa6D5h3IUVMtGU39ucbk4WyZ1Vtkbkn6 fuz3Be0vfLoDOc6TOBOJvl1A6VlMugTHj2TsPe3ketirWrmeProcay6/f0+xfztAiIjJ 0gfNwbQjEdbZbbdS/MeqdsTaGCbAkWqDUUK2FHdlkiDr3z0r/bKzTm4fJsTFiv9JUlVM 8kS+J/VKogBsRs7QthGx206VcZC5JdWEC/nsBZEySjRjcyZ7ar3m1pJ5HwkYiVbXvuVQ WLZQnAvsyEqrfwUun6EVypfAfr3tdKpQF2p1gEyFxemrOOFiDqOUjhpX68Eso7tUh+D9 5A== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6rb4wy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Jun 2023 01:42:29 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 357Nb1Nc037103; Thu, 8 Jun 2023 01:42:28 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6hyt4e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Jun 2023 01:42:28 +0000 Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3581gQUf031871; Thu, 8 Jun 2023 01:42:28 GMT Received: from ca-mkp2.ca.oracle.com.com (mpeterse-ol9.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.251.135]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3r2a6hyt3a-2; Thu, 08 Jun 2023 01:42:28 +0000 From: "Martin K. Petersen" To: Hannes Reinecke , Azeem Shaikh Cc: "Martin K . Petersen" , linux-hardening@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, "James E.J. Bottomley" Subject: Re: [PATCH] scsi: libfcoe: Replace all non-returning strlcpy with strscpy Date: Wed, 7 Jun 2023 21:42:06 -0400 Message-Id: <168618844269.2636448.11401028964590624302.b4-ty@oracle.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230530155818.368562-1-azeemshaikh38@gmail.com> References: <20230530155818.368562-1-azeemshaikh38@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-07_13,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 adultscore=0 mlxlogscore=922 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306080011 X-Proofpoint-ORIG-GUID: dd6hYK7Yg_iOLpXPHXqjQ7ekQiyuLhdK X-Proofpoint-GUID: dd6hYK7Yg_iOLpXPHXqjQ7ekQiyuLhdK X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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-kernel@vger.kernel.org On Tue, 30 May 2023 15:58:18 +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(). > No return values were used, so direct replacement is safe. > > [...] Applied to 6.5/scsi-queue, thanks! [1/1] scsi: libfcoe: Replace all non-returning strlcpy with strscpy https://git.kernel.org/mkp/scsi/c/4dae0262fb99 -- Martin K. Petersen Oracle Linux Engineering