From owner-freebsd-hackers@freebsd.org Sun Sep 27 20:09:40 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 641A1426A71 for ; Sun, 27 Sep 2020 20:09:40 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BzxZX26FNz4H9N for ; Sun, 27 Sep 2020 20:09:40 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 26E0414C0C for ; Sun, 27 Sep 2020 20:09:40 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f174.google.com with SMTP id q63so8264918qkf.3 for ; Sun, 27 Sep 2020 13:09:40 -0700 (PDT) X-Gm-Message-State: AOAM533nO0owWuxlcU1wfOLBeSgR1w1F1Iwkz9FHVWrM9iv6Vu/SKFpB 2unrNVygM/QIDJnfEaWqm9hQWKu3Z4/sHcFHq5k= X-Google-Smtp-Source: ABdhPJw5KGliFJ3ShSoQ+iafsTE7tHLAVSU4NtrnPjU3zX6KD2SCT8EVtxpLW0wn2PbAc7lmUUEu8PMUzy96/vvdA04= X-Received: by 2002:a05:620a:136e:: with SMTP id d14mr9271903qkl.430.1601237379793; Sun, 27 Sep 2020 13:09:39 -0700 (PDT) MIME-Version: 1.0 References: <9fa46833-63c2-a77f-98dd-111f6502dc74@rawbw.com> In-Reply-To: <9fa46833-63c2-a77f-98dd-111f6502dc74@rawbw.com> From: Kyle Evans Date: Sun, 27 Sep 2020 15:09:28 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Is it possible to exit the chroot(2) environment? To: Yuri Cc: Freebsd hackers list Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Sep 2020 20:09:40 -0000 On Sun, Sep 27, 2020 at 3:04 PM Yuri wrote: > > On 2020-09-27 12:56, Kyle Evans wrote: > > kern.chroot_allow_open_directories to some value that isn't 0 or 1. > > > It succeeds with kern.chroot_allow_open_directories=2. > > Ok, so Warner's proposal was correct and we've verified the semantics work out the same, this is simply a behavioral difference in that we're a little more strict -- presumably to make it less trivial to break out of a chroot. I suspect a default change for the sysctl/behavior is unlikely, your best bet to move forward is probably to work out if they really need to have dangling directories open and correct that if at all possible.