From owner-freebsd-hackers@freebsd.org Sun Sep 27 20:15:52 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 8D18F427319 for ; Sun, 27 Sep 2020 20:15:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bzxjg5ZR1z4J3v for ; Sun, 27 Sep 2020 20:15:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x832.google.com with SMTP id b2so6625291qtp.8 for ; Sun, 27 Sep 2020 13:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CQhPcY9DlHbMOMnrsAA6ABkzNETJI78eieaQDW96fTM=; b=b3ZP/uXGsgRGdo3yPpyxz8II7cHvagrgb6iz18nymK6gOtF0HnFsrua3m0eurbB1Jw FK9Qqxcdzq5GRn/D5CoGI3jvLXFWRhy6hh+ZeHngXf8JjnsX+g1ZeF8SvHhXXzQY/A7u +cnYpzVIru8+agvmAWoDx6czyCZpKj2B2dprevL2lEnVM7L3UozftAEUz0oxKxDbulmi C0zcYKUdn005hqUY3gpyUyqcr9Ocyx5Zb1F0yGHZYZNQhN7ocmGVkrRTajTI2pQugx/4 +hM1/Wt0nb8z+cKZb+y2dukpvwuB4ZGUWt3A0RcfZ5nF3z6QVUxf4f6uVGIZW+8pjVB1 kvuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CQhPcY9DlHbMOMnrsAA6ABkzNETJI78eieaQDW96fTM=; b=SZdBbnrAqcdqJMfkl/C+XDwOqPw2uIeaLh0RCTNHiIy/imSvs21XGX9z6Y6ZjD/lHB mt3GNBvFUzCdacqD/gYWkkMl2ovf04OxsCuRK5Zbod2bRHRrPxnoh0gSeFLX/1qvqAHa 8FXFAagKLJLaNH5uHQRMFAxYU0+egpisDPu/Q84yMj5RGbRPma3C+DrBD7YP7HDsIeFK vbr4uZPiy7AOPtHPSiWKPuSSPnDMsHxTVxwJ8+9lODXe6dBeC8aNBZj7DsaoyK5ZuCwt 6VQHgHgKlN8rmOx1rRDcF0kmyBH5VnqcbVgdmm5RBtQzdx/77Goj2iXNSnEKqlZwZjGq Rb1A== X-Gm-Message-State: AOAM530H/fu3rF78ie/qudQuHY5GtEyMmyIS1uYBIiBBWgbbpm4nN/wF 28rb9YPwsjBB8IhSxkPoJLhWHH4lWcNfbi5UTJcJZA== X-Google-Smtp-Source: ABdhPJxTX0OpmTBbuUdjpH/tCJ7WRjoCPsaWjV/avjSqCB3UkjIKyqzLGDfiPgq/H5xnu3FQdbfM9os+fV7EcbYcogs= X-Received: by 2002:ac8:7388:: with SMTP id t8mr9579776qtp.187.1601237750714; Sun, 27 Sep 2020 13:15:50 -0700 (PDT) MIME-Version: 1.0 References: <9fa46833-63c2-a77f-98dd-111f6502dc74@rawbw.com> In-Reply-To: From: Warner Losh Date: Sun, 27 Sep 2020 14:15:38 -0600 Message-ID: Subject: Re: Is it possible to exit the chroot(2) environment? To: Kyle Evans Cc: Yuri , Freebsd hackers list X-Rspamd-Queue-Id: 4Bzxjg5ZR1z4J3v X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=b3ZP/uXG; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::832) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.26 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.99)[-0.989]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-0.998]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.27)[-0.274]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::832:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[freebsd-hackers]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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:15:52 -0000 On Sun, Sep 27, 2020, 2:09 PM Kyle Evans wrote: > 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. > To be fair, we are more strict than Linux... but it is documented. Though if there were some way to highlight that better, I'd be open to working that in. Maybe a sentence on 'any other value' paragraph talking about traditional behavior... Warner _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >