From patchwork Wed Oct 11 03:41:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rik van Riel X-Patchwork-Id: 151107 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp284314vqb; Tue, 10 Oct 2023 20:42:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPJpWwrVMz59r3dbpEu+dijAsaQsNMls40sY6Sz5831ANshoHH9G0hppuUTgsO60Wb4pJq X-Received: by 2002:a05:6808:1495:b0:3a8:458d:e1cc with SMTP id e21-20020a056808149500b003a8458de1ccmr25128642oiw.1.1696995731885; Tue, 10 Oct 2023 20:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696995731; cv=none; d=google.com; s=arc-20160816; b=kyZQW0WqgzHryTHwTld2cpT1/2a4swM8DgvqYyBMjViu+Xh5449ICvz9FKlODMHwRV vv+UBFU7XRDClhSR+MXRfzKWmX1ygGw09gaX1rwzwpYuUNN+m8HQ5rGBKfq6n0vgeruc qFm/bpPzrL91K1y2vGj+zapqmPJnz1OIuoRSE3yuK4rejp861AMsyHxDe0qAsilQ02m8 Z5CmQ6i0whbmOB3WfnbcnfxLiMAxqHz6DEUJawxglSWKAMjVH+PSUCZ3rVh/zziCxdh4 DvZS8/xC2BIlgf4ZAzhAy8OhIyhFv+TG7FnwoLAv9AVLc20T3llhUR0/LSLyOT6x33vo PCkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:subject:cc:to:from:date; bh=bLyQO33tDw0iksj7Gaz/Kn20E/yoVolkW/flR1G7DUs=; fh=IaHIGecTgtBZWzHFdribiMaBLwiIQP47sp/WWUYgmOw=; b=RrB73wP/yk0NP0dByx9PiqEwob3bFU6AEgMP/S6+3oMuTc5v7SggyzQ2XPXefHNhTj 7H5gBYVWNUXvYlAIyopucAa/BBykZ+/jSYOn12j686ckz1KCARSIy0jVwq1mo241xPNU rsj3G4ePQWCQ38MVpPlH4/N47gvBFqdECWTDrkBAMRnOEJ7DMviYmhDo6+Ixx7AudZP4 B7SgW/0v9oZVaiwaGKxq7bUl1A6KRJ+I0Ms5CijIJWpluqrMsoNc+TdmHda5mH9aDXqz zj2SIHdI3IqZ/MMP5UAJF38cc4XdmtE6ACC/JUNCDj60SVQRaNCGvLKqbjg0+Fv9prnh LKUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d19-20020a637353000000b0059b950975b9si3159458pgn.534.2023.10.10.20.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 20:42:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 262BF80657C3; Tue, 10 Oct 2023 20:42:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229496AbjJKDmI (ORCPT + 19 others); Tue, 10 Oct 2023 23:42:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjJKDmH (ORCPT ); Tue, 10 Oct 2023 23:42:07 -0400 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C0AD92 for ; Tue, 10 Oct 2023 20:42:06 -0700 (PDT) Received: from [2601:18c:9101:a8b6:6e0b:84ff:fee2:98bb] (helo=imladris.surriel.com) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1) (envelope-from ) id 1qqQ6f-0006gO-0x; Tue, 10 Oct 2023 23:41:57 -0400 Date: Tue, 10 Oct 2023 23:41:53 -0400 From: Rik van Riel To: Alejandro Colomar Cc: linux-man@vger.kernel.org, LKML , kernel-team@meta.com, Eric Biederman Subject: [PATCH] execve.2: execve also returns E2BIG if a string is too long Message-ID: <20231010234153.021826b1@imladris.surriel.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Sender: riel@surriel.com X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 10 Oct 2023 20:42:11 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779428996456082463 X-GMAIL-MSGID: 1779428996456082463 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 --- man2/execve.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man2/execve.2 b/man2/execve.2 index 0d9582492ad1..c1a359d01872 100644 --- a/man2/execve.2 +++ b/man2/execve.2 @@ -449,7 +449,7 @@ The total number of bytes in the environment .RI ( envp ) and argument list .RI ( argv ) -is too large. +is too large, or an argument or environment string is too long. .TP .B EACCES Search permission is denied on a component of the path prefix of