From nobody Thu Mar 31 19:37:34 2022 X-Original-To: freebsd-hackers@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 26A961A4C726 for ; Thu, 31 Mar 2022 19:37:37 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KTtqh1qn4z3pl2 for ; Thu, 31 Mar 2022 19:37:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qv1-xf2a.google.com with SMTP id e22so373271qvf.9 for ; Thu, 31 Mar 2022 12:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Qj0YtbZHgOxwNVTqRESKux6iIBjq7T9eUQOVyf0emJs=; b=Mh0bMvK+NgMe3pklMKwqUND9DRFrfkb5RyDPJGqOXpIeGyQ92MxzV/nFuhZyM0cP4r wlgr0P/9BBnd680KC3M2tTdXWmdZI2yOmBArQFTdYKddU5icRMJLzsws4uGRc6G0yJQ9 KhiCFGY9FN+lnkU4aNdN6V7zr18WXbcxzACkXf1zh9/Z3RUENTW/mLD7ndl+FxxQ8R8z nGDIP9Fmxn5vEbSVsGDmmZUnOVv2RxFzG4IsLL3xbJ1qyv4XJ/CNfeNJLxLRwB2hnll4 yrYploPcr2ozTFMq/ces8imCkLq8KeNrFUtUsAsrPEhmtTSP1LefFl/SMi6EupfDNxJc z0Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Qj0YtbZHgOxwNVTqRESKux6iIBjq7T9eUQOVyf0emJs=; b=ThfRbKcGLXyVGmQzNmYMRDJa5PsQV3h2X9RbWKC1femJa2q52RfgI9k2hbyD3EQfGj +wuGx/tLzG+b7zc9unPtUDuOjhg/gh3kEll28+Fp0Q181t86s+Vqfg4rQCIpXcMk+ZrR anNoll8bbwbYTLicxMxWGGFhvBOsmpdJVut4Nuoab+fnMvvZ1a2ynfmIe7rNwmLFfuDY XXbJul7LPvFgEPf6uLaori7TovgZjRyFo1QnWxRIEWxyni6sKAdmS4FOyDm9/c4xDkTI ShaI86UpHWB2cFvD3/LvguoUe3nDSR9Cgx8jZwwUKblE2X5LiuYduy2lEwOlV97sZUj6 Dh9A== X-Gm-Message-State: AOAM530WeAgBtu5xIer6x4lhUen6T3Ysvjt+QXveO1tVieMk096WndtT av+q1BPFkq+m805uL91OpH0GmA== X-Google-Smtp-Source: ABdhPJyuf57VdZYtnAhE6savUWM0hdeyggmPH5b7V3OM8oBmp//bnwVmoogFOviBZVPjZdhxaT8tdQ== X-Received: by 2002:a05:6214:f2f:b0:441:1bd3:1539 with SMTP id iw15-20020a0562140f2f00b004411bd31539mr5268199qvb.56.1648755455678; Thu, 31 Mar 2022 12:37:35 -0700 (PDT) Received: from mutt-hbsd (pool-100-16-224-136.bltmmd.fios.verizon.net. [100.16.224.136]) by smtp.gmail.com with ESMTPSA id p17-20020a37a611000000b0067b2b2c41fasm125896qke.81.2022.03.31.12.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 12:37:35 -0700 (PDT) Date: Thu, 31 Mar 2022 15:37:34 -0400 From: Shawn Webb To: Ed Maste Cc: David Chisnall , FreeBSD Hackers Subject: Re: curtain: WIP sandboxing mechanism with pledge()/unveil() support Message-ID: <20220331193734.3pwhap2443gd33hg@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 14.0-CURRENT-HBSD FreeBSD 14.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <25b5c60f-b9cc-78af-86d7-1cc714232364@gmail.com> <01320c49-fa7e-99d2-5840-3c61bb8c0d57@FreeBSD.org> <2d103b77-84d4-fbd7-d957-21b9aa4d5d79@gmail.com> <16ab7cdb-32b4-5ffe-f6a8-a657383b3078@FreeBSD.org> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ph6ib4uu6ovyuodt" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4KTtqh1qn4z3pl2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=Mh0bMvK+; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::f2a as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [-4.96 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; NEURAL_HAM_SHORT(-0.86)[-0.860]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2a:from]; MLMMJ_DEST(0.00)[freebsd-hackers]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[100.16.224.136:received] X-ThisMailContainsUnwantedMimeParts: N --ph6ib4uu6ovyuodt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 31, 2022 at 03:33:06PM -0400, Ed Maste wrote: > On Thu, 31 Mar 2022 at 06:25, David Chisnall wrote: > > > > Capsicum simply disallows '..' in paths. >=20 > This is no longer true as of 7359fdcf5ffa. During a lookup the kernel > checks that each ".." component specifies a directory that has already > been visited in this name lookup call. >=20 > > The execve hole is the reason that I have little interest in pledge as > > an enforcement mechanism. >=20 > Note that execve is only available if the "exec" keyword is specified. > The child does not inherit the parent's limits, though. I wonder if there's opportunity here for a little divergence. I think inheritance would be a good thing. But this is more a philosophical and subjective argument than a technical one. --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --ph6ib4uu6ovyuodt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmJGAvwACgkQ/y5nonf4 4foOEQ//WCETIFfsCTzVRqAhWFR0Cksm5CnQJ3Q07Olk4ZCSHK8qQZM5KhYug4Si THDcBmF671qwhm4H7rALyeH+4II9uHTRnWK3FsyfUEO96CD3Nzl8cqKOPiMZ/Gwz 1VmTsaUYmdODGjtGC/AgTXp9+4mQGd1jXAO7Kdk57WYMsK8fxQ+YpDth2ejmOtrQ itdiHMB5R5B8OUO3ULB+3tEs1U0uDap1RpzejAnFv7T1NTNOGyIrjow9KbuLf092 mUuBqA0yJPDni46Sqq4FvvKQnuEXNLZ60jiIrKvqYqEcJmZKRb1IZ/0vR4wLkfWt ZnqdQoSH9EQh1TPTYZD5TT4kIbVkR9201Q8EOqQ0HvrlWQ7ka4LYyuAazTGLr8H3 WOZVUSzntxVnCeLUNG5TLIMxduJpQBFbrkuLnN63JIfmEN66fORk0v12BuJ5yiZA RgywFXvA55EDfLLP7nF4WKrg9Aif7JoXh9afx/glSjKJmbKjxWDgoIypJchmeJ4D PHIV2KU8/PGq36aQvtD4Hs//51zrgCU1NsszmwY75WYvspFSwgMLHbm+uNqmsUiT 6I7LWSol3y0hcJdPRCCmQMRuA3JCqUXUOJze1PlN3hBYyIu4W5Mmx50l/O3skz5w hS61Ta0aKM72RSGp7u6pGL0h1lNPGb1xameiACYMrk+3sWORGLo= =rLMD -----END PGP SIGNATURE----- --ph6ib4uu6ovyuodt--