From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: dsterba@suse.cz, "Lauri Võsandi" <lauri.vosandi@gmail.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: enforce chroot for btrfs receive
Date: Tue, 14 Apr 2015 09:19:12 -0400 [thread overview]
Message-ID: <552D13D0.2030205@gmail.com> (raw)
In-Reply-To: <20150414122810.GN25622@twin.jikos.cz>
[-- Attachment #1: Type: text/plain, Size: 945 bytes --]
On 2015-04-14 08:28, David Sterba wrote:
> On Tue, Apr 14, 2015 at 01:44:32PM +0300, Lauri Võsandi wrote:
>> This patch forces btrfs receive to issue chroot before
>> parsing the btrfs stream to confine the process and
>> minimize damage that could be done via malicious
>> btrfs stream.
>
> Thanks.
>
> As we've discussed, there are possibly some things to resolve:
>
> * chdir("/") after chroot
> * commandline options to enable/disable chroot, choose the default
>
> Receive should work for a non-root user so chroot should be conditional,
> but I'm not sure if this should be guessed from the UID or if this would
> be better to specify only by the commandline options.
>
> I'll put the patch into a separate branch for now.
Personally, I would expect it to default to not using chroot(), provide
a commandline option to tell it to do so, and then just catch the error
from trying to chroot as a non-root user.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2967 bytes --]
next prev parent reply other threads:[~2015-04-14 13:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 10:44 [PATCH] btrfs-progs: enforce chroot for btrfs receive Lauri Võsandi
2015-04-14 12:28 ` David Sterba
2015-04-14 13:19 ` Austin S Hemmelgarn [this message]
2015-04-17 17:34 ` David Sterba
2015-04-18 13:59 ` [PATCH] btrfs-progs: optionally " Lauri Võsandi
2015-04-18 14:52 ` Lauri Võsandi
2015-04-19 7:25 ` Mike Fleetwood
2015-04-19 11:46 ` Lauri Võsandi
2015-04-19 12:05 ` Roman Mamedov
2015-04-20 12:13 ` lauri
2015-04-22 17:27 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=552D13D0.2030205@gmail.com \
--to=ahferroin7@gmail.com \
--cc=dsterba@suse.cz \
--cc=lauri.vosandi@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).