Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp832238rdg; Wed, 11 Oct 2023 06:53:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETRBCbC0p5hCuCBeIKkgDtSTbE+0x+7Xe3yIy+RN59SXncUgD/p/l09vm9y9vBUfPaqan0 X-Received: by 2002:a17:90a:c0f:b0:27c:fb84:101a with SMTP id 15-20020a17090a0c0f00b0027cfb84101amr3132661pjs.29.1697032382140; Wed, 11 Oct 2023 06:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697032382; cv=none; d=google.com; s=arc-20160816; b=gtof6RUO8jeeanMZjm06TlQ+j8um/xOawl7aT2uwvNsvqDGtB9Wb3AL/BEfgDKk+u1 BnP7oKMlq1GzprDmrg+8Baan/ayhroMBgk4RnIhDU2Fz4xIf55WvrT0Q01FCIprWl0/q iFPPRV6KmEpwIxGjWYCPNjaTeqDrFKqq9JzaTAsy700A3Vu6I8XJ2Xx14Eck8gxokg5v OyXrqaqkLpHh2Ohna/z+cFxMSx6wyYGH6vFhRuhF4MV38iyTfHpZDoWru1T7RlFHPjDQ wlvNb2HWl1duvexPnpzXzFHjW6IJn05yzXqx9oozcpzNsDl3O0m3CHitpbvD8pPmof/0 ocwA== 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=lRfBMqrxE6o0aXiKIJD1B2cej8T8E1hA6przV4Far5I=; fh=dVeMSFEj6H3ncA1ms7Xvh7pkQ2XQ/5fxGlGuU7gKdZ4=; b=QdBU08n402fNo/9EBoNTNREzddumQ1EeC1p12GT3N/SM8FMmBULT5hIZ0eFxNd+LNC MlXrb8v7il18tvHkpaTKKIhIyvGqBIIRQan0L2IkLdqlnyXDeis6VlattS+qRaNFzjCW qJaeojDn/kiFHKvlNBx5eRc/SKacHnPNbsxUgmrdlGlxZNrJ/H/hLumjELMB2GbNmMJW KIwCVw/wgBSv1l83GQL6xNeNkrGnLu8msCUQAUPM054SKEIItYXGNwZTRwpv0gIAOvDb 7h6eHNuaYtjQ3Csc2igBUBV4HiuhSX7uaEu9wHnnJ78ppmtvsGQc0ANW78Lddpu0+8dD so5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LYrS7L3I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id pf3-20020a17090b1d8300b002774985e8b7si4161005pjb.168.2023.10.11.06.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 06:53:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LYrS7L3I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id CF703801B99F; Wed, 11 Oct 2023 06:52:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232213AbjJKNwm (ORCPT + 99 others); Wed, 11 Oct 2023 09:52:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231642AbjJKNwl (ORCPT ); Wed, 11 Oct 2023 09:52:41 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 339BA90; Wed, 11 Oct 2023 06:52:39 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-5a7af52ee31so31913107b3.2; Wed, 11 Oct 2023 06:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697032358; x=1697637158; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lRfBMqrxE6o0aXiKIJD1B2cej8T8E1hA6przV4Far5I=; b=LYrS7L3IfBjViW3Z9RZ+tABYnZ1HGSbII08w5j02XIs4FOeuQfu/iEWd5L0nzews/p vZ0cb/eUYXb8n2G038I4rkSa9QRCoM6GZt5l6wcKKkCVITuut0mrbttWpP2uzEZeled+ cNrI59BE/eYgHGBTGn92eqxC23mZASayBDiNckEIkCiCriBUF8y1VErTeRsZLF8yVjCm Z/46OHmx/6BnNCLQN7AuyDQJjhmKSpSF9THwV5R3ndW4fjCkoE8B/SqqPseW026gmB7v RCLTElz2MDy8yQ3BG16FmkR0OB2kXqfyRezXL27F7Fp2cgoHTsA0mmeHpEH11B0wrKFp tA9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697032358; x=1697637158; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lRfBMqrxE6o0aXiKIJD1B2cej8T8E1hA6przV4Far5I=; b=jZ9nkfuLiHnqveevfzYiw8D8GrS1AJLKCsSnG9OVS4tZ5lAh5awOX/DD7xJCZ98mG8 GCMvrGCcTUFaZD5TGrfnwbFIOPOcnb9yLejGb8Va9GafDhpwqYzoi4CUZrC1JXn5Dusb 7qHc5kYdFqG7Y4b34DQubct2GC8/xV1iTxSHGyq5yH6NzFqpvHIMgmgMNHR2iIUI8rJ3 LOqelKYhOPL24QUmJKT/0Bs0NL9Q7l/Zuv8SLtN9eZzMKFekHoljTUHUYyd75aJUqzzH eqLBEZHFK8leD/4OpDeoT1MB9wz/kwALLs/FMmHplFvN0rxtCwkOTk4wQz/Q+tR8cFGx /gzA== X-Gm-Message-State: AOJu0YyAK8xqly2VYcY688O7HTDtt8KiEi6CA69GrioWzjEbl7LecB7p vMx2CYZqzF3x77EW9GjP/I1X3m0dh2Zd+Q== X-Received: by 2002:a0d:c646:0:b0:5a4:db86:4ea8 with SMTP id i67-20020a0dc646000000b005a4db864ea8mr21453719ywd.31.1697032358276; Wed, 11 Oct 2023 06:52:38 -0700 (PDT) Received: from firmament.. ([89.187.171.244]) by smtp.gmail.com with ESMTPSA id j131-20020a816e89000000b005956b451fb8sm5132397ywc.100.2023.10.11.06.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 06:52:38 -0700 (PDT) From: Matthew House To: Rik van Riel Cc: Alejandro Colomar , linux-man@vger.kernel.org, LKML , kernel-team@meta.com, Eric Biederman Subject: Re: [PATCH] execve.2: execve also returns E2BIG if a string is too long Date: Wed, 11 Oct 2023 09:52:22 -0400 Message-ID: <20231011135230.750728-1-mattlloydhouse@gmail.com> In-Reply-To: <20231010234153.021826b1@imladris.surriel.com> References: <20231010234153.021826b1@imladris.surriel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 11 Oct 2023 06:52:58 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 11:51 PM Rik van Riel wrote: > Document that if a command line or environment string is too long (> MAX_= ARG_STRLEN), execve will also return E2BIG. > > Signed-off-by: Rik van Riel It might be worth mentioning that strlen(pathname) must also be strictly less than MAX_ARG_STRLEN, it being subject to the same restrictions as each of the argv/envp strings. Thank you, Matthew House