From nobody Mon Aug 26 18:47:25 2024 X-Original-To: bugs@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 4Wt0663992z5TQWX for ; Mon, 26 Aug 2024 18:47:26 +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 4Wt0660NvZz4DFN for ; Mon, 26 Aug 2024 18:47:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724698046; a=rsa-sha256; cv=none; b=HZ73j8XiTSW926TAqzTQGN7p8hToKuNTeWJTsb125L5QwK1YJ/4NSed/OG1vBbQCBsSAq2 f5GchAHJ9fklyqMYlqYil9Gdd7UpE5wOj9fyIPjoQW/Vq6SPI/FP5DR6c5vo8J1Xrcm4iE nCxJucByqu/f2ArrvIoT8AU5PO7JMogonYCTOdXss8ON0K1ga4Zwnp1jGXiH2oYRy6s/YG 7S7MoFsKvEBgLJA2cO3kgepoyX/CPxYwZgE0QCnwVQdbNCqIcnrQ+GczPfEDHP3M8ewESK wuCbKlg/dB+ddiLeFJQlMPv/KWV4xJoQ3Kfg/bEP7eAbRQgEUuM9qPIhkm+PMQ== 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=1724698046; 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=FU0/TZxB3mcQoNS+dDV+TIgAfYlIVMMIgT9rANbjDSE=; b=C+JJ1SMAmnxm/xjOOQ4wO9V2lBI61zrbl8nxI/sp8NhyQHvgkcZhZ3KHQDHWVnjmyP239i 61qYnk6h2sCi2UrsDr4BiiodeXUAxbGr3tDrIG6agguPdnhCvgzzPhbHNRSdqg2nCtnxAw X0ZCfVWNHqo2JkPRra/7fWqpsVz17ZWnLacmISqDx3da+sk7Zo8iEr0xeG9h1z3m9PAVIe 2ZwFcj/mAl6YYjuOfupGYh+ySBGjpjgT7skFOaxKiP63wSK94++OozhP9diWg0O5bb72wa 6AU/G21pAFC3YK9Aq2lQrvnPizjtVSoNBSL+C6CbsZ4+VPZ0i157gEuL2H2iRQ== 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 4Wt06574ZGzJ3X for ; Mon, 26 Aug 2024 18:47:25 +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 47QIlPUj025054 for ; Mon, 26 Aug 2024 18:47:25 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 47QIlPr3025053 for bugs@FreeBSD.org; Mon, 26 Aug 2024 18:47:25 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: bugs@FreeBSD.org Subject: [Bug 280809] jail_attach(2) fails to document reason for EPERM Date: Mon, 26 Aug 2024 18:47:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Documentation X-Bugzilla-Component: Manual Pages X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: karlo98.m@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280809 --- Comment #4 from Karlo Mili=C4=8Devi=C4=87 --- (In reply to Olivier Certner from comment #1) Ah! I totally missed that paragraph. I guess I should read more carefully. (In reply to crest from comment #3) Could you add "root vnode pointer" to every directory FD to limit their sco= pe? That way, when you reference ".." you would check whether the directory FD equals that pointer and if so, not go above. Also, O_RESOLVE_BENEATH would then just mean that when you open that direct= ory FD you would make the directory itself be the "root vnode pointer" instead = of its jail/chroot root directory. Opening directories with openat copies the "root vnode pointer" unless overriden by something like O_RESOLVE_BENEATH. ((I have no experience with VFS code, so take this idea with a grain of sal= t!)) This reminds me slightly of how sockets have vnet pointers. Should I close this issue or does someone else do that? The reason is documented already, as stated by Olivier Cartner. --=20 You are receiving this mail because: You are the assignee for the bug.=