From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46235C28CF5 for ; Wed, 26 Jan 2022 20:00:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229559AbiAZUAR (ORCPT ); Wed, 26 Jan 2022 15:00:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbiAZUAQ (ORCPT ); Wed, 26 Jan 2022 15:00:16 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37E5AC061748 for ; Wed, 26 Jan 2022 12:00:16 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id h14so582175plf.1 for ; Wed, 26 Jan 2022 12:00:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7vGJI4nloykuytCh04yZHKOOnvQenKvjTpFkLxyvvX8=; b=AoFPUGOiiE0SjS7R3CRyfLhPaDGYufx1Fy0VCOIbCb04/Tm97Ppd8ZwCIQJahqtDHY ePOcJk/Wt6uTcWuQ6ctyg73kHY6+7HegV1Slu4nFsy3KopjP3V34nmIy5GjSVp0wgrvM lXlq6alNgLxuQtJbH5AonrGSs7qRW3roz5pbQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7vGJI4nloykuytCh04yZHKOOnvQenKvjTpFkLxyvvX8=; b=roj4jROXNzjuF2QecsWkr/yQxxwmH9vn4KwVTs/EeiFkJWZuInC8CtZVIoNva8UUVd O9sL5fFGGf2UD4HLGQKtaIbfwFQZlFSm35sYD1EbxD//U03IcVuKDlXhlUfiEfJxIGbE aY2cihUdBYHGTBEtYa0ljwlTcUVudnNT49TL26Ok4Q8e49h6XBwsyz+GOLWvqnA+rL9c emqrHf+QUkiKLsKcfHFo3oUCmmPSFbQzmPEt3/jzdb1+W3je6od7PhZZ5KjI3KHclLXr gAWDW1hHSlX+H7dssSuZRD8j/4olPKmudeL5j25/UX84zRhpxyblXsEmIxBhVKkiasCV SkHw== X-Gm-Message-State: AOAM532T6+kInfit7v97o+xpJ6dqHnFKUub3vNZhbFfRNBfUXjn3en/6 0Nuw/GXYueiC3+DULN3V3bgnfg== X-Google-Smtp-Source: ABdhPJy0/ctpfNKTbk08+sJLyTKqJbn2bDi5F7J+5b2L1+WbtU1+Qm9HlWh5xiDBkUIec/TfZOzcaw== X-Received: by 2002:a17:90a:fe1:: with SMTP id 88mr10457332pjz.150.1643227215699; Wed, 26 Jan 2022 12:00:15 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y8sm17803158pgs.31.2022.01.26.12.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 12:00:15 -0800 (PST) Date: Wed, 26 Jan 2022 12:00:14 -0800 From: Kees Cook To: Ralph Siemsen Cc: Greg Kroah-Hartman , Andy Shevchenko , Arnd Bergmann , Jiri Prchal , Mark Brown , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH -next] eeprom: at25: Replace strncpy() with strscpy() Message-ID: <202201261200.615E6BEB07@keescook> References: <20220118182047.3385295-1-keescook@chromium.org> <20220126194839.GA3763384@maple.netwinder.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220126194839.GA3763384@maple.netwinder.org> Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org On Wed, Jan 26, 2022 at 02:48:39PM -0500, Ralph Siemsen wrote: > Hi Kees, > > On Tue, Jan 18, 2022 at 10:20:47AM -0800, Kees Cook wrote: > > Use strscpy() instead of strncpy(), since its use has been deprecated[1]. > > > > [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings > > Along with your other fix to restore the missing kzalloc(), I tested this > change on 32-bit arm system, and it worked as expected. > > Tested-by: Ralph Siemsen Thanks! -- Kees Cook