Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5543581pxb; Wed, 26 Jan 2022 14:37:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcTlesV5YB4dd2r5q/Fr3D6J5zclhl3iyjrTE0BNi9/qp7pb/RFeDR5bvwvIIE6x1Qg3N1 X-Received: by 2002:a17:907:168a:: with SMTP id hc10mr667290ejc.283.1643236641374; Wed, 26 Jan 2022 14:37:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643236641; cv=none; d=google.com; s=arc-20160816; b=wayWxQhyfXS1bnM+AKegBYyZkydijC13rUXzYn8bIGSSU5As4Huu4KO7oGMPsgmt3o 06wci68aey4W5hABg1ic1qct4WxrGm/wgLZegL01rGgyd8LD7RsnBtuIb6+0Sb783S3w BeL+lndwb8zKGioTnDHJte2PARsCfcitfXeetXYur/iulyUU65TH1kmVw2x7nc8B7H8s M+g1qR7/Mj/SbxjQSx/fu6fvz1xpumfUF6Ad5JEJs8FCmA0pEN2+ERfrxInzPXlAecWB 0l6s5E4dTygCfFzSIdxHGUB/gaS3jYRjJlrBI8bp+boP/ToT5mc2LGMuqV9SMyapScFw FoJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7vGJI4nloykuytCh04yZHKOOnvQenKvjTpFkLxyvvX8=; b=0t9beJGphCgPEdBENnqOhfIGC7TiIq9WJYOvQOG4+5u7QQCAxUOWHK5xve7eNExb+S 6sNcpmHrUiAAd2xCUKvvcEOKw9VA6qwNL4M2N9fhmhl6D7Kex3ORPY3Wu57IbexGycNl te/eJzHzyxuHwuBHAvHZwP0C9l38v3i0SFntdWHHjLmUR7ucOQbsBYj/E8JdcMeAwSyW bhNgCJaK3fq7aWAZE1RQ3ZlcBYSfRe9Am8qS9PGT2qpYhrDOinf2eWqIlg+fvnQYhz15 /My+Xy1DQZ6bNrAiPOoe3zXMAmIg2smg3knuGIRGwymq3wMevanYFir2WbaX/iVyu80W rCLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AoFPUGOi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m29si286591edj.285.2022.01.26.14.36.55; Wed, 26 Jan 2022 14:37:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AoFPUGOi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229531AbiAZUAT (ORCPT + 99 others); Wed, 26 Jan 2022 15:00:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbiAZUAQ (ORCPT ); Wed, 26 Jan 2022 15:00:16 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35098C061747 for ; Wed, 26 Jan 2022 12:00:16 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id j16so564495plx.4 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=Izhqb0vMjOWP8xIfJPoDSxxoZKRYCeqDwhoHS3QhWKOGBiLhL+Zti8+PZBLStUOxIP hgx9AiaW41ja5lKeC1bomCaB2YEbjLJhHmnFQ8CyWw5E/Pgd81fI0ssPtA/K9HxLOM2M Y5sB3eOugCJgVrx41vrFwJLN2PzfYbw/zan/7iOT9L6b4WD+Apm1EdSIvgPViJNrQAJF cDSBPhoqbaFz6MQEyEMHtzplRL/D34zo9SNlD7d0S5SzAA8mx9wqPl9F2PQSPPDv01Ls G/eGmfqXSQJGaRo7BO5Uz0wqu98ZGT3aRU6d0lpQhZtZDpngu4qmRM66QKITgkcmbzSq zxtg== X-Gm-Message-State: AOAM532GH/APU35S3TfVyzUmap/MX2e0vbhnGvZ+QtnbdQcTRDvREjTC lHq1oqzGSpW9LZEnd7XJIk3WKA== 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-kernel@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