From nobody Tue Jul 9 21:29:19 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 4WJYz55kZnz5R7V9 for ; Tue, 09 Jul 2024 21:29:21 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WJYz51jh0z52FW for ; Tue, 9 Jul 2024 21:29:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720560561; a=rsa-sha256; cv=none; b=QnprCZJiiqs4ZrFO//+K4a57he3gmco2R0v+I8GjTtK1MjPvb3MXlWyZm180tcwKV8NTXV QpdMag4aXzHaZ34g62uQEvC7V8pr3L8sOdFhnJ/X9vG2yKCqltETeTE+UxWTuiRh/dJ+Tq aAz82tnaCZeo/fqSiUwoLi3T8mYOX+/mUbJxjPw4IyE4tE6IglKA1gHe+RFVjqRO48o0o5 bMRvTSTwNKS91GPyiNFXB5deDRomZPaTdsAo9P8eUgyNgquGwbJr+MM6SKU2zS3HcY0k/M VWzwjBRR9YDBZAMprzGauKS2CMJJF9a7SGYZ72n24qdAQn4w+t/dwbk0vsR69g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720560561; 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=n6Fz3hAXlwKJKTYL20WYql0qWaeomlL9OoeONQkUfas=; b=CnwF6JYk77bS1nv/1Frj6iRME+3W1kzVketgBQS1pTvVntexjRi8cqGpCD8wcqxtW7mfE5 6RIUJQmq5uPScocCl+nU5cyouIcW9/GhexnZFFizzx+wpDV4VM3bkeGAWjlhoCmN19tCy2 0DsPIAe69eTF+ltPYnZX9qpnU9H9b03bzJxTsEaQ8NgWUVu4MqKvZBLUjsNdFqF739vagk LSUo9uJT6/usHO/o72/UtEQHjIjBD1egjooL4WK/2iViGaXSnz7PiW/FAsbA4gsI0xGEul 7UzokXupDzSGS0aGuceSl9o7CLw7aMRoHfpN3xrtHYH3o3qV1Amr+ECZVYevqw== 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 4WJYz438PyzqNP for ; Tue, 9 Jul 2024 21:29:20 +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 469LTKGu051323 for ; Tue, 9 Jul 2024 21:29:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 469LTKhZ051322 for jail@FreeBSD.org; Tue, 9 Jul 2024 21:29:20 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: Tue, 09 Jul 2024 21:29:19 +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: me@svmhdvn.name X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: jail@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 Siva Mahadevan changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |me@svmhdvn.name --- Comment #10 from Siva Mahadevan --- I'm running into the same issue while trying to run the www/py-gunicorn rc service. It took me a while to debug this issue due to the fact that the er= ror would only pop up once in a while. Since the behaviour of the working directory being $HOME is not documented anywhere, I think it should be fine to remove JUST the chdir block here https://github.com/freebsd/freebsd-src/blob/5f75cd390a67cbec06993c4c66f784f= 0f777c854/usr.sbin/jail/command.c#L791-L795. I agree with the suggestion of running exec.clean jail commands rooted at '= /'. --=20 You are receiving this mail because: You are the assignee for the bug.=