Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1259311rdb; Fri, 19 Jan 2024 13:15:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYmKTUXVfwGauniHiCQq5mboQ6SkKIslhRnT3zKfhW/u4hL3GGsCKlJ3b5s31TZonEdb+t X-Received: by 2002:ac2:4245:0:b0:50e:ebf5:c5dd with SMTP id m5-20020ac24245000000b0050eebf5c5ddmr135529lfl.60.1705698911406; Fri, 19 Jan 2024 13:15:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705698911; cv=pass; d=google.com; s=arc-20160816; b=oBsPhmMrRlkD7IzpUUHKIwUl5U4Ig9JsNSIONpwO1upprq9D9t/fzPgok6UzJMvLrx MuwQHps12U/6qEQxAPQhU2tnhiBjuBU0U+DoEcVu1q5kr2XqH2BcA4QeANjhsL5Lo7Jk 91MxBf16BAlCj9SFB08ew2jQBXnrpMJmS7gL8N5NQGwGua8XWjhpOAgv11Jvd1XwNBxX yh5mwitRYC31pLRlJ3aDaqcYfxCrwu/pvUF/i9MqeE0D0yxYKxIT6SgMc+0OmADlUNRU yWIfb1YwaNMxVwQflKBOwuUdNZnmUZJ8dN5cfbj5fbhTJdpnloP46fjHPYRzJhbrCN0R tTjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=1jO5gTxlFcZqy3fTlQWHVnYXrLv/qAX0Mnxwu0zISok=; fh=ig7nm3iBt6uuI3B9pZr4Ok32r8tnnv9ScxFMjH+85/c=; b=XhiSbj4WCKr4wEwlLVfue5FmhbrhElxAR9fvq3aitiTFo7l7OPiC2bBT5U8kJz2gpM eHGYU0YSK+PU+SW+0IH80xtWoWKGFgJWxbP0YMh99kKQVZNZRRoii+WaNxE8TZhGe/7L shhT60jhFO9JDP+dUmJ/2ex3QdJCsa7AoG81jxgWV+Dfmvvo+WmeUaqi11IaNsZdj+CQ oMtv1fUVmW6F0vRbVOfreGywayiuAntoDnKWfwirtCmjz8gMmgcA79NnQ0uFQGxfXhV4 gDSJ2ULAldS300atVgFurySRjO8iOnBaI+7mnXPPZtKeWYSAeOtOw9yQsL6kEdpRhwKq CosA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Npu+jXgd; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-31564-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31564-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qu18-20020a170907111200b00a2c1061b99asi7825226ejb.332.2024.01.19.13.15.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 13:15:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31564-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Npu+jXgd; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-31564-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31564-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 291391F23313 for ; Fri, 19 Jan 2024 21:15:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E41658109; Fri, 19 Jan 2024 21:14:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Npu+jXgd" Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 136C938E for ; Fri, 19 Jan 2024 21:14:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705698898; cv=none; b=iekIKqporAU9EJEVXqd84kFG45tnyWNFtkfSak9KTGTW5V00DbQMPx6h5YVCMcT2Vmg8pQaQCmzRV9Qyr2dSHgHiESM1mhBQuGU3FVNMq9dkwnGrw44L91ggix53ldDdju1yhEK3BMnOOMxpHVdjneqxb3kwzYtDqd8FUZEgM+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705698898; c=relaxed/simple; bh=F9F2GNKmjLUbux+84Pb89lxHGN+eZi/eIvcnBt3MVnw=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=Sq/MXvw3hrPMdq9p5lxUJE/+pMOA7mxkeaTiKIj+2bfTv1fFJldXLIG6fopZBeT6rwmcglTYNXyYSpdqlWsRI5Xi1195gYtBOc24JgPL9+wCEY20stCu7/1kkvb4UBfiNxnp4B9CuIHZF0Wpvafb+xxVt9dGG49706Mk+bjT48A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Npu+jXgd; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1d5f1e0e32eso8923365ad.3 for ; Fri, 19 Jan 2024 13:14:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1705698896; x=1706303696; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=1jO5gTxlFcZqy3fTlQWHVnYXrLv/qAX0Mnxwu0zISok=; b=Npu+jXgdh1m5j24CHVteSOvlcRn7MaK7MqofDUJIix+GgSLeP6O6k2Tdb1ohzCK4ZC nPRTHJhdhxwbJ9dl1oZ2Gn5aGuhcWMSgrFQvEMjunPub5aB9ZlNaznsFBMdObUs82kso +z1973MPe3ZAWGYSKC29TH0D+kevL0dTJDUMI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705698896; x=1706303696; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1jO5gTxlFcZqy3fTlQWHVnYXrLv/qAX0Mnxwu0zISok=; b=b0jyZ7k7Gkw2ZGq0O50DYH3SP4kaQG3LaDp/afcddlsvbKTzlSM7E9qsBgbWqwUaz1 EBTE8FEk37Y/pJ8haDya6qDiLWgAtEbsMtT+kgb6bWTqy1+3OYmw1AxhheIjYyQkRXPX NlE9gxkkdiF8szWtdjAHiBD72G/xoGCDb2qbn52T/c1+Cz3JHkvM8ogydKnh0PSoj8uG ASma5LAwGd3hcGcp6/4k40h1NQd3hggyolz3Rpctzqi3QX0DgxtNkHYV850EDMxGe2YD R5QhSxMadzq80jO0/3aYOYQymK+twZe1t+iJSe/ROd2sCfPOrWPNYtlKKOuNoNKT4XbC yUDw== X-Gm-Message-State: AOJu0YyWUV7k/jNL7KDvLrJY4rWITxTOOxQfR2ZPUGhFeFjUNsri30fM M3mfN9yjnW9ieqKJyQZO8h69Mt2caPN1fnvqvWukBPlYRU/DuhOzgvxqFgLcoA== X-Received: by 2002:a17:902:db05:b0:1d7:20a4:4a91 with SMTP id m5-20020a170902db0500b001d720a44a91mr502945plx.109.1705698896431; Fri, 19 Jan 2024 13:14:56 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id kh6-20020a170903064600b001d5e1353693sm3433530plb.266.2024.01.19.13.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 13:14:55 -0800 (PST) Date: Fri, 19 Jan 2024 13:14:55 -0800 From: Kees Cook To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Andrew Morton , Andy Shevchenko , Andy Whitcroft , Azeem Shaikh , Brian Foster , Dwaipayan Ray , Joe Perches , Kees Cook , Kent Overstreet , linux-bcachefs@vger.kernel.org, linux-hardening@vger.kernel.org, Lukas Bulwahn Subject: [GIT PULL] strlcpy removal for v6.8-rc1 Message-ID: <202401191311.B6AA79D@keescook> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Linus, Please pull this strlcpy removal for v6.8-rc1. As promised, it is the "part 2" of the hardening tree, late in -rc1 now that all the other trees with strlcpy() removals have landed. One new user appeared (in bcachefs) but was a trivial refactor. The kernel is now free of the strlcpy() API! Thanks! -Kees The following changes since commit b0d326da462e20285236e11e4cbc32085de9f363: Merge tag 'sched-urgent-2024-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2024-01-18 11:57:33 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/strlcpy-removal-v6.8-rc1 for you to fetch changes up to d26270061ae66b915138af7cd73ca6f8b85e6b44: string: Remove strlcpy() (2024-01-19 11:59:11 -0800) ---------------------------------------------------------------- strlcpy removal for v6.8-rc1 - Remove of the final (very recent) user of strlcpy() (in bcachefs). - Remove the strlcpy() API. Long live strscpy(). ---------------------------------------------------------------- Kees Cook (2): bcachefs: Replace strlcpy() with strscpy() string: Remove strlcpy() fs/bcachefs/super.c | 4 +-- include/linux/fortify-string.h | 51 --------------------------- include/linux/string.h | 3 -- lib/nlattr.c | 2 +- lib/string.c | 15 -------- lib/test_fortify/write_overflow-strlcpy-src.c | 5 --- lib/test_fortify/write_overflow-strlcpy.c | 5 --- 7 files changed, 3 insertions(+), 82 deletions(-) delete mode 100644 lib/test_fortify/write_overflow-strlcpy-src.c delete mode 100644 lib/test_fortify/write_overflow-strlcpy.c -- Kees Cook