Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37439rwd; Wed, 7 Jun 2023 18:53:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ufNlRuCStfddBpgrLD3mZLxKesal3Y9tIZ98wh/6O+bIemID0VamHxDMJYtIwFo5kUJGO X-Received: by 2002:aca:1a16:0:b0:399:6025:e285 with SMTP id a22-20020aca1a16000000b003996025e285mr7003234oia.15.1686189237217; Wed, 07 Jun 2023 18:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686189237; cv=none; d=google.com; s=arc-20160816; b=m4/L/ViWNK3VOiFY8VzO3h+evUELb3S7U8mpEvK4TGo/ksKs/HdySnsKop6ZwsP43w 7SaEW3qyMTeF7dumGL08zsrFVoZhUJe1wfccQAv8ps73chaZn6BcyKLNLZ4g7CKz7R2q UojEbau05FRylduE2l5+iNRZB3spD/WewwGBFq/F/QcLfj3rB5kuqcnVvvrbtUwnXbOp Z4THVsNZYtZrwJ2XDL9J12p9JsGpUfa96ajxU+wt28sTuOjVCFI+/43mCZrP6DXHRuL4 Djn49t5f+/7SRvgCw2YME0hHu5OCTw/whBKZo5K5OMam+M6rkjsrWDGX1bMT1yEP3s+j VYVQ== 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=CV7UX/nctwvfWFI0+kOOCsFqipiqUIxEJ/D1ZD501kQ=; b=ndByOkskZXKQy9qTg9uFAddO7aijewEYKz2BxD78Y3hhPwfxVEH8ffCOlH4P5aZlSR dHd1UI8M1iM6Qz/UZL7i48cLK96dhPBDmi6WTIlfzboBwAPJYDqTv9+TOcLKuv8VfYE3 +pML0tMh5HR/hQh4m4x0v4Q036zTHT26Iop4V2DotLZ8IV17It1O8D5dfKmJQMkPe2gA wi/FnUl8efK+e1zFgmyO8/YKphKLStlGaL2Npc8a6fEb8363CluQCUMhGnpGVngV+xOl rHr052tQ2oGxyCw1a4Oq6XU8kEMRdIi8TV6BcLoHDPDOU8DBp3Js46bavpxM15hcYwBq jCnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=P6kIQ4AL; 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 r16-20020aa79ed0000000b00653c0edfd34si27335pfq.139.2023.06.07.18.53.43; Wed, 07 Jun 2023 18:53:57 -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=P6kIQ4AL; 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 S233453AbjFHBmr (ORCPT + 99 others); Wed, 7 Jun 2023 21:42:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232715AbjFHBmg (ORCPT ); Wed, 7 Jun 2023 21:42:36 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33CFD1FEC; Wed, 7 Jun 2023 18:42:36 -0700 (PDT) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 357LwklK019376; Thu, 8 Jun 2023 01:42:32 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=CV7UX/nctwvfWFI0+kOOCsFqipiqUIxEJ/D1ZD501kQ=; b=P6kIQ4ALEnsQPCHbAcJT0HCDQHurMxs5QrMee2QsYOWJXjE8mgMbHrleRJhKDB8x9WNm bI9H75sah8AkyJZfLBMgP5drgIUSzhrJ6NgRoqJk9J+ZxJmN8bZLL0ixncxlqIVm6z9q BD70yzbKAQ79UM/maEEuWJf2Amrc+Ogj9rKNfi/w/U+sezYfrB1vHm3gQw75BboEVTqB Oc7TfmpyF/6T2nhWdvSnr3ue2z0pR/89H572RGouA7sgPExXn1pkVKcDxk5uKK/rzkE/ YNbN9ERHwmFDsK3Ff/BQk1lU3IPtFepycjPnXdQ0l2i4zUyoAqPy11Av0TQqRUoOCCoR ow== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6sk76f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Jun 2023 01:42:32 +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 357MeU2x037112; Thu, 8 Jun 2023 01:42:31 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6hyt5n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Jun 2023 01:42:31 +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 3581gQUj031871; Thu, 8 Jun 2023 01:42:30 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-4; Thu, 08 Jun 2023 01:42:30 +0000 From: "Martin K. Petersen" To: Matthew Wilcox , 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: sym53c8xx: Replace all non-returning strlcpy with strscpy Date: Wed, 7 Jun 2023 21:42:08 -0400 Message-Id: <168618844272.2636448.5811508326302611111.b4-ty@oracle.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230530160323.412484-1-azeemshaikh38@gmail.com> References: <20230530160323.412484-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=956 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306080011 X-Proofpoint-GUID: waLOh-oCUJL4e2B29tGPDQrZUsMKTLhP X-Proofpoint-ORIG-GUID: waLOh-oCUJL4e2B29tGPDQrZUsMKTLhP 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 16:03:23 +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: sym53c8xx: Replace all non-returning strlcpy with strscpy https://git.kernel.org/mkp/scsi/c/af0ce90200c9 -- Martin K. Petersen Oracle Linux Engineering