From nobody Thu Jul 16 10:18:18 2026 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 4h18CV21Dtz6l55y for ; Thu, 16 Jul 2026 10:19:02 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h18CT66PJz3nb4 for ; Thu, 16 Jul 2026 10:19:01 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2cc73e322dbso78555125ad.1 for ; Thu, 16 Jul 2026 03:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1784197135; cv=none; d=google.com; s=arc-20260327; b=DaQp9cOi6Mmjcd7p+BnTVq+g8nW+m6qAgU7RdCD2GJzVLljBgZvc9ev/Y7gJcoMhGa 7sGLHvsm2/z4EDYeLuLNrm4/i+gFUgLEjLVrZbs7E96EFpZ13U8neUq1+KXO4OyMWnzX 38+whLRuLsAYEZkwtj3wH1GUvNA49smf5APONUKOAcN0z3qJS7qGy18mWQWMXu/DdgFn OquWB/0BcwpTBUjxTSdvSyaei2aF+is3JSgHNoqeyr1MbilQlRRoEZ6lrCu8yj9oUTZq dXfxUFVIUUk/HbrX8rRU4QwvuIHfWbTp+WSVCz5T0LBeh3e12O5XxWsuVq2hWxlBawbM bauw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=1lpl9qIMe7WaRwu/3AaJTQR3PN2c29PeNjnqHM3n7JU=; fh=fjoDi+DRF1Oo95loyQzrMGvD1uY9FYiC6gRyz1jaKZ4=; b=LkgEKAAWaUI0Dk382JcMUIr1eECEWPStgSA4R+RAhvkr83d760kmriczKQ/jiLJJkZ GTAqelv5398zArDq9f19/umdAe1qUy9QoFU2/CdpY5+miyY7ahbDDoqEShZ5OGuRh7pt n3e7YMD1mLFMjnisSRhv3CE8xkB7hreu5LlR/JQh/IMaL9LMxBBwauzU1/Mg4BI+hWxA I8Ruh3Dygcz+HP+kG4QJKn04VQwNfTaQ1yi0hZ/1f1wkcY3LHokUoSL0cbYaeqVR0KF9 5+nNgy1Yv/VsIEfPDxZEokQJb8fMKwGaN54Y+MefHJK6yGl9jhBaqf06HRxU2nIw8Bk/ Bcxg==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784197135; x=1784801935; darn=freebsd.org; h=content-type:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:from:to:cc:subject:date:message-id:reply-to :content-type; bh=1lpl9qIMe7WaRwu/3AaJTQR3PN2c29PeNjnqHM3n7JU=; b=D0M5fZubQ889zjkky+7EN5H2A0CfGpyi117ovw76Dvs+MBXc8QsXe8+NgpOPg4YCKv JsIrNy30DPCA9l6+l2nLeHSJ7WDW4Sz7rPrHi+7AyH7mIdGuCcseaalOfo/FT2zWhFEh HBPEclI7B/MY0nA+7cRIauOMHECarul9FarniM0bDiXAZGay+x+g6uHmVQdCxTL0zMd3 Srq4X6ySjpo7NvmPKcJHRobzkO/HJwyTRtk5xK+jqM1qFsad8Q6P2CiWLv4VJ6zfdOPE Yrs87b6O9SULrjwGJoAOJFK2q3o/KtSfPG0ij4vlWrxndu7QODuAEZ5xMOVkkxn+8LG1 hS4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784197135; x=1784801935; h=content-type:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=1lpl9qIMe7WaRwu/3AaJTQR3PN2c29PeNjnqHM3n7JU=; b=DexMbebhle1NV+le8qCt9R7yXLLTy9NzeqLeqGmGGoESDGLQhITkqCoavQtaxJd+lO S2xfnRTotCRLh/Kjrc7ZFumeoAzjMYdsMnb6JGs+kmgL3TeyvhtP+CD6uJcIrm/LriOW glChmYwTVIq2BSlOtCNJSl2GIXqZPnGp0B6i9uNlxauLVjMlYeuGFh7k9StTLujyEZQr gisTK50ye4aL/X0DtTKTuMZKce0gFmPOh1e/7wE2ND4pdtAlB+hI4IVDnvUHsW/tMvQH dchvf1iD9ykG0phvskX5XWpRH0rUXmJ5CVEKNg8ZbDfZPZEnHRN4qlm6ed68GYslBMMf XuJA== X-Forwarded-Encrypted: i=1; AHgh+Ro8qzJBrhCEiJyg6V0vDx1Kb36nncdiWaRlvTaSsNZ4CPQDKCahMdjCBUL/Wv4Lk7BCYpZsjM3VMR1eC0FUOt8=@freebsd.org X-Gm-Message-State: AOJu0YyzgN61TVAXLpoST/GCYk+bDNC3UnIwOXKUYOJzajuXUKRgak/m SvVFEnSBh2lGUJssgWJ22VPZfWUC51COZGmhhQAjaRZDMACxQQrDMh2O4RzzQjoxH/R93+sjZYi AgHVnt7Ffjm5ZrGLHAeham+HUnvDAb3g= X-Gm-Gg: AfdE7cklPZDP+rETSSYx7iJIPQIDoRnRFxKlRNZJ+eFk6iJVyHpHDJgz1I/fpJ4hvds fToQlohK/73f4TBdDVxIylM/CAoPKaZ8cqw8J4lqV/447AEffuAKYhUy5YL0lkRVvG7dGYUPtRU C4i7489JULNNY7uGrp6gPRkD+NYK5LxUYmokCx3jQ+VmRsvmnWdNKZpJeJgmAhEYte0NcMgLgha NwKGaTAsGICWH88RJSZuOA99yvKE6YHaer30rIwRcXL1vSV92NcjyIdPHkGHRNT8nTxEau0etcW c8QN4l6SqKMpcjYHnJBBaXxHnOM8M0oIJ288EDjJiXnbNdwPrqVIqP3sUnRz+9vSHPc2M/G+wDf iisS9aXNB6CIwhHBfcr8Ba8hxdATiYklkrIbdn82+ftN+AXOeDeZOsH+Ck9CtjLorR79SwIxmQK FV9+HJdOtXjwYyUlzYaWjChJsZSl0t4tdQLdvdc9B1kDGlnTPubp//8A35GOP4E9YNbxEqPDBC1 f2QLXb5qjo9w4ylxcL/gqNfiUfH2Bu7Y98LBNSnxm6eLeEwxhf8wcqjjxjD9kTaaFpYX/wkwxI7 fDZzTD3EuZTAwmFF3vzrvgM= X-Received: by 2002:a17:903:1b63:b0:2c9:cf62:6f61 with SMTP id d9443c01a7336-2cf03cad4f3mr63896505ad.17.1784197135376; Thu, 16 Jul 2026 03:18:55 -0700 (PDT) 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <20260716044911.31a9930d@rimwks.local> In-Reply-To: From: Mario Marietto Date: Thu, 16 Jul 2026 12:18:18 +0200 X-Gm-Features: AUfX_mwzlG4ZPcsI0wLerasGb4cIyPlSAnjBC1KrPch7bvqbOivKRdjsgKY7LHs Message-ID: Subject: Re: automatic creation of a chroot environment To: vermaden Cc: Rozhuk Ivan , "freebsd-hackers@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000076a2f30656b7c4c9" X-Rspamd-Queue-Id: 4h18CT66PJz3nb4 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Spamd-Bar: ---- --00000000000076a2f30656b7c4c9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ---> Thank You for sharing, I will add this to the next VN. What's VN ? If I remember correctly, did you also add in your VN the project of the virtualization of a Linux/Freebsd vm using qemu accelerated with bhyve / vmm ? Can you share the link ? just curious. thanks. ---> 1. How is that better than 'Service Jails'? ---> 2. How is that better than 'Single Process Jails'? Waiting for the replies to those questions for improving the idea. Somethin= g's cooking in my little head, but I don't know what yet.... Mario. On Thu, Jul 16, 2026 at 9:09=E2=80=AFAM vermaden wrot= e: > Hi, > > > I've been using chroot for a long time to reduce > > the risk of web application hacking on my server. > > > > Some time ago, I decided it was time to automate > > the creation of chroot environments and create a > > universal solution for any application/port that > > would be easily customizable. > > > > For simple applications and ports, it usually works > > with minimal effort, but for complex ones, it takes > > a bit more tinkering. > > > > The current implementation creates a RO chroot, > > without setuid files, with one user and one group. > > All RW locations are mounted with noexec and > > nosuid. This makes escaping such a chroot > > environment extremely difficult, and webshell > > and other PHP hacks become impossible. > > > > I hope someone finds this useful. > > > > https://github.com/rozhuk-im/chroot_env > > Thank You for sharing, I will add this to next VN. > > Two questions out of curiosity ... > > 1. How is that better then 'Service Jails'? > > 2. How is that better then 'Single Process Jails'? > > > https://vermaden.wordpress.com/2023/06/28/freebsd-jails-containers/#singl= e-process-jails > > Thanks, > vermaden > > > --=20 Mario. --00000000000076a2f30656b7c4c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
---> Thank You for sharing, I will add this to the= next VN.

What's VN ? If I remember correctly,= did you also add in your VN the project of the virtualization of a Linux/F= reebsd vm using qemu accelerated with bhyve / vmm ?=C2=A0
<= div>Can you share the link ? just curious. thanks.

---> 1. How is that better than 'Service Jails'?
---> 2. How is that better than 'Single Process Jails'?
Waiting for the replies to those questions for improving t= he idea. Something's cooking in my little head, but I= don't know what yet....

=
Mario.

On Thu, Jul 16, 2026 at 9:0= 9=E2=80=AFAM vermaden <vermaden@interia.pl> wrote:
Hi,

> I've been using chroot for a long time to reduce
> the risk of web application hacking on my server.
>
> Some time ago, I decided it was time to automate
> the creation of chroot environments and create a
> universal solution for any application/port that
> would be easily customizable.
>
> For simple applications and ports, it usually works
> with minimal effort, but for complex ones, it takes
> a bit more tinkering.
>
> The current implementation creates a RO chroot,
> without setuid files, with one user and one group.
> All RW locations are mounted with noexec and
> nosuid. This makes escaping such a chroot
> environment extremely difficult, and webshell
> and other PHP hacks become impossible.
>
> I hope someone finds this useful.
>
> https://github.com/rozhuk-im/chroot_env

Thank You for sharing, I will add this to next VN.

Two questions out of curiosity ...

1. How is that better then 'Service Jails'?

2. How is that better then 'Single Process Jails'?

https://verm= aden.wordpress.com/2023/06/28/freebsd-jails-containers/#single-process-jail= s

Thanks,
vermaden




--
Ma= rio.
--00000000000076a2f30656b7c4c9--