unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
To: levenson@mmer.org, 55034@debbugs.gnu.org
Subject: [bug#55034] [PATCH 0/1] Let openssh trust /gnu/store
Date: Wed, 20 Apr 2022 10:17:16 +0000	[thread overview]
Message-ID: <7684D647-31F8-4509-A18A-283DE789F0B3@tobias.gr> (raw)
In-Reply-To: <20220420084724.3514-1-levenson@mmer.org>

On 20 April 2022 08:47:24 UTC, Alexey Abramov via Guix-patches via <guix-patches@gnu.org> wrote:
>This patch allows users to use /gnu/store objects for AuthorizedKeysCommand
>and similar options. According to the sshd_config(5):
>
>> The program must be owned by root, not writable by group or others, and
>> specified by an absolute path.
>
>However, this is not the case for Guix, even though it is RO. OpenSSH doesn't
>check if the location mounted or ended up on the RO mount point.

The RO bind mount is not a hard guarantee, and a footgun protector against accidental writes, not primarily a security feature (IMO).

By design, *anyone* can write *anything* to the store by talking to the daemon.  They just can't choose the file name.  A much weaker guarantee than OpenSSH assumes, at the very least.

With that in mind, could this highly intrusive patch be used to compromise a system?  It seems so very likely.  If it is, Guix will be rightly derided for what amounts to ifdeffing out the securities, even if OpenBSD's can be frustratingly theatrical at times.

>I think implementing a check for RO location is much harder here

Why is 'RO location' relevant here?

If the snippet you quote above is complete, which requirement does the un-bind-mounted store not meet?  I can't think of one off the top o' me head?

> , rather
>than to trust /gnu/store path.

That's a lot of trust.  Tens of gigabytes on average.

We explicitly rejected that idea in IceCat for example, instead whitelisting only specific store subdirectories.  Why is OpenSSH different?

> The same way OpenSSH does with users' home
>directory.
>
>Let me know what you think.

The rationale and its assumptions (also) belong in the patch itself, not just a separate mail.

Hi Alexey,

Thanks for the patch suggestion!

Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.




  parent reply	other threads:[~2022-04-20 10:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  8:47 [bug#55034] [PATCH 0/1] Let openssh trust /gnu/store Alexey Abramov via Guix-patches via
2022-04-20  8:49 ` [bug#55034] [PATCH 1/1] gnu: openssh: Trust /gnu/store directory Alexey Abramov via Guix-patches via
2022-04-20 10:02   ` [bug#55034] [PATCH 0/1] Let openssh trust /gnu/store Ludovic Courtès
2022-04-22  7:02     ` Alexey Abramov via Guix-patches via
2022-04-20  9:56 ` Ludovic Courtès
2022-04-22  6:44   ` Alexey Abramov via Guix-patches via
2022-04-27 21:54     ` Ludovic Courtès
2022-04-20 10:17 ` Tobias Geerinckx-Rice via Guix-patches via [this message]
2022-04-20 10:20   ` Tobias Geerinckx-Rice via Guix-patches via
2022-04-22  7:33   ` Alexey Abramov via Guix-patches via
2022-04-26  7:25 ` [bug#55034] [PATCH v2] gnu: openssh: Trust Guix store directory Alexey Abramov via Guix-patches via
2022-04-28 22:07   ` bug#55034: [PATCH 0/1] Let openssh trust /gnu/store Ludovic Courtès

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7684D647-31F8-4509-A18A-283DE789F0B3@tobias.gr \
    --to=guix-patches@gnu.org \
    --cc=55034@debbugs.gnu.org \
    --cc=levenson@mmer.org \
    --cc=me@tobias.gr \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).