From nobody Thu Feb 22 08:06:45 2024 X-Original-To: jail@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TgQhj5L5pz5C8Cc for ; Thu, 22 Feb 2024 08:06:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TgQhj3Np3z4RQv for ; Thu, 22 Feb 2024 08:06:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708589205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0H/JYILlgTmNnxp7E0sxQIMc4pTCEUCTI9fYowomPl8=; b=Pb+HBFuVWp668c9KlEG92sNG3v+jNQvMjxQuMOtAVFlCS3NzUwH8wtOvqa4XeAM5tRhg8g qg4VDgEBasfaQEJC221+Dcmzo4wVfxdrTd+tgE3Qs3al8vhxvOPPOkW79DT47ZBWRW8l1i zEMmuGqIF5bOCGY1V/TM1ZoO8YJBNTnmxBJBX5J7mWkEMcdnSSJwgFkrUnRfwWvARqFkCM mRAPor/B8rBlPTZTW3PR2ilx6F67CbwaQEdEpm6uviefAaRbrH1uPX1ebs5xERqrCU/8ol /18VjX/dzgIpXylNQ+jt84y47k9WjyaYA0uRGrBKgRNE402+bSwVKb8px4wNsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708589205; a=rsa-sha256; cv=none; b=gbI22Lh5L3geBzU5Jmy3EAQ8f7Drz01VXNwUq6yxtlLXN+V78nNyHcW1WFuCL2pqVFXPYQ 3Gq/0qrN+8LWhkI9s5WuHxTQDCc3vB0Y6w1bsdITsB92I1/tjA4VL/Gled9acA29s3x3Vn +WOdSv6rzf52xHrm7YzHp6BPUFjo9X6gK0y4jXctl6nVp4htxiy2gWUyFeEWbzbt0UOkKj 4c9NwX0r3XxuX+ysfDFO6eoeuMa+MXx2qmGx3Bc7cco6E5QwFuKT/PUGSLivXGcXjE//hJ MqU6MCZqmU3q7yeT8t8sBSaVbxeqU+Ur7CAomjzVFlKqlCsAVyjZjYVKCd/a3g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TgQhj2MLkzNml for ; Thu, 22 Feb 2024 08:06:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 41M86jnD064002 for ; Thu, 22 Feb 2024 08:06:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 41M86jgY064001 for jail@FreeBSD.org; Thu, 22 Feb 2024 08:06:45 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: jail@FreeBSD.org Subject: [Bug 277210] jail(8): exec.clean retrieves PWD from user info (can cause services to crash on jail start-up) Date: Thu, 22 Feb 2024 08:06:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: michaelo@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: jail@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion about FreeBSD jail(8) List-Archive: https://lists.freebsd.org/archives/freebsd-jail List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-jail@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277210 --- Comment #7 from Michael Osipov --- From jail(8): exec.clean Run commands in a clean environment. The environment is d= is- carded except for HOME, SHELL, TERM and USER. HOME and SH= ELL are set to the target login's default values. USER is set = to the target login. TERM is imported from the current envir= on- ment. The environment variables from the login class capab= il- ity database for the target login are also set. I completely miss the chdir(2) here with PWD. That is the first one to be f= ixed even if it gets reverted because it is not documented. --=20 You are receiving this mail because: You are the assignee for the bug.=