Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7647489rwd; Tue, 6 Jun 2023 14:08:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4nLe3FgrA5lDas6+jOORD4uy5+RL2iVq0L+aDNw6r7TsIRLcR3JWl3qDD57wdEjnbi+3St X-Received: by 2002:a17:903:228c:b0:1af:e295:ad56 with SMTP id b12-20020a170903228c00b001afe295ad56mr3943109plh.49.1686085721629; Tue, 06 Jun 2023 14:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686085721; cv=none; d=google.com; s=arc-20160816; b=UGAy6sD3bdggUvHfl1fPrRSi5v/XnwyzwGJsuAjOAKxjwFrPp7X0bwR6KfgFPYz9l9 4jkY9ALxz4RP45a0X++pjlOmRXYRfEBjRD+ccauG4qPh4mCDBgMUrdmz+V8o4ZVqfing wvI/7jw2Ztzuw8VIsavzyHiJwnUefm304jpLjaFQNKrW+45dejVbEPn9WxHUftfcNfTJ BXJj32/78KJclNdWg2GQaivdkjAQil4hT/weg/oSq0BQsOZuzlrC4+G1GXnt3vWEzmMC A5K3cnhSANSBSyKQbngv8lYeKshdetgm4tGezm1Fe3w2lPyDLmnh8t2FrY7V2MhfVQZd VNng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=sNAYzZKOrE1uM5ydLk1X7A/cGsWA3ELrEHWb6VcjRw0=; b=TmDjBd0zhNwL/0VmR8HXm7om9v4gaKyswASMYOKuXNPAZm7ux1eiiMQGE3/1Oy2JN+ 7OJPirtZ9VWWwqHT9sYe42BR00zgqfGtls8M5z3LtuKNxMeSkUBU8SZWU+ekz/VP8vGl hlSI3A8Mv9nZ/WPS4PRns+iOwU6PKCmDxkN9lSd0wOBsbTaG5cYJUm2j9KNJ73X5z6yd MQbuW4SWGs3rH1AOlxj3Dkg0dVb36pPTX+PumiH1p/pQK9JT0J8un/Ro9ofavEIDvOTr W93JoYUj7n7VJqBxEd5DRMSphCpS8VIuiGTt5uEQRcKafxLznDMkXW8jg2IDQL+itKEE SuEQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kw6-20020a170902f90600b001a4f1a956d8si7656692plb.57.2023.06.06.14.08.28; Tue, 06 Jun 2023 14:08:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239551AbjFFUwG convert rfc822-to-8bit (ORCPT + 99 others); Tue, 6 Jun 2023 16:52:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239592AbjFFUwE (ORCPT ); Tue, 6 Jun 2023 16:52:04 -0400 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDC101717; Tue, 6 Jun 2023 13:52:00 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 8F00B63CC103; Tue, 6 Jun 2023 22:51:58 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id PHgZNUdjvgcB; Tue, 6 Jun 2023 22:51:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id BE5DF608F44F; Tue, 6 Jun 2023 22:51:57 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aN1OkdMjbyuq; Tue, 6 Jun 2023 22:51:57 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 940C063CC103; Tue, 6 Jun 2023 22:51:57 +0200 (CEST) Date: Tue, 6 Jun 2023 22:51:57 +0200 (CEST) From: Richard Weinberger To: Azeem Shaikh Cc: Maxim Krasnyansky , anton ivanov , Johannes Berg , linux-hardening , linux-kernel , linux-um , "Jason A. Donenfeld" , kernel test robot Message-ID: <1833651082.3690424.1686084717406.JavaMail.zimbra@nod.at> In-Reply-To: <20230606182410.3976487-1-azeemshaikh38@gmail.com> References: <20230606182410.3976487-1-azeemshaikh38@gmail.com> Subject: Re: [PATCH v2] uml: Replace strlcpy with strscpy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: Replace strlcpy with strscpy Thread-Index: kDC0hXVrB1XbeTt1tCVxurpE9ug2qA== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR 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 ----- Ursprüngliche Mail ----- > Von: "Azeem Shaikh" > 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. > > [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy > [2] https://github.com/KSPP/linux/issues/89 > > Signed-off-by: Azeem Shaikh > Reported-by: kernel test robot > Closes: > https://lore.kernel.org/oe-kbuild-all/202305311135.zGMT1gYR-lkp@intel.com/ Are you sure Reported-by and Closes make sense? AFAIK the report was only on your first patch and nothing against upstream. So stating this in the updated patch is in vain. Other than that, Acked-by: Richard Weinberger Thanks, //richard