all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: store reference detection (was Re: JARs and reference scanning)
Date: Fri, 12 May 2017 13:39:18 -0400	[thread overview]
Message-ID: <87inl6ht4p.fsf@netris.org> (raw)
In-Reply-To: <87o9uyv665.fsf@gmail.com> (Chris Marusich's message of "Fri, 12 May 2017 01:19:14 -0700")

Chris Marusich <cmmarusich@gmail.com> writes:

> Mark H Weaver <mhw@netris.org> writes:
>
>> Hartmut Goebel <h.goebel@crazy-compilers.com> writes:
>>
>>> Am 02.05.2017 um 14:43 schrieb Ludovic Courtès:
>>>> Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
>>>>
>>>>> Am 27.04.2017 um 15:46 schrieb Ludovic Courtès:
>>>>>> ‘propagated-inputs’ is one way to manually specify run-time references.
>>>>>> It works at the package level and not at the store level—that is, the
>>>>>> store item’s references are unaffected by what ‘propagated-inputs’
>>>>>> contains.  It’s usually enough for our purposes though.
>>>>> I'm not sure if 'propagated-inputs' are enough. For example
>>>>> "python-passlib" as propagated-input python-py-bcrypt, but the later
>>>>> does not show up as reference, requisite nor referrer:
>>>> Right, that’s what I meant by “not at the store level” above.
>>>>
>>>> Ludo’.
>>>  So I propose to add a small text file ".guix-dependencies' to all
>>> language's packages which do not add some kind of references themselves:
>>> Python, Perl, Java, etc.
>>
>> I have thought of doing this in the past, but there's another more
>> difficult problem that would also need to be solved: how to make
>> grafting work for these non-plaintext references.  If grafting doesn't
>> work, there's a good chance that software with known security flaws will
>> continue to be executed.
>
> That's a good thing to keep in mind.  I think that the references we're
> talking about putting into a ".guix-dependencies" file or into an
> uncompressed JAR file are in fact "plaintext" in the sense that these
> files are not using compression, encryption, esoteric encodings, or
> other obfuscations which might defeat the reference scanning or grafting
> mechanisms.  I'm not convinced we need these things (a list of
> dependencies in ".guix-dependencies" or embedded classpaths in JAR
> files), but if we used them, I don't think it would interfere with
> reference scanning or grafting.  Would it?

It would not interfere, but it could have the effect of *hiding*
security problems due to a failure to graft properly.

If there are embedded references that Guix cannot see and therefore are
not transformed by grafting, we are most likely to become aware of this
problem when the referenced store item is reclaimed by the garbage
collector, thus breaking things and prompting us to investigate.  This
is in fact exactly how I discovered another problem of this kind:

  https://bugs.gnu.org/24703

If we create a redundant set of references in another file, then
problems like this could go undetected for a long time.

Adding more 'propagating-inputs' would have the same problem, and cause
other problems as well.

One thing we could do is add a phase to certain build systems, which
would try to use additional methods to detect these hidden references,
and deliberately cause the build to fail in that case, raising the alarm
that grafting would silently fail.

What do you think?

      Mark

  parent reply	other threads:[~2017-05-12 17:39 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13 11:29 Need help from Java-developers Hartmut Goebel
2017-04-23  8:41 ` Chris Marusich
2017-04-23 22:57   ` Chris Marusich
2017-04-25 19:28     ` JARs and reference scanning (was: Need help from Java-developers) Hartmut Goebel
2017-04-26  5:34       ` JARs and reference scanning Chris Marusich
2017-04-26 11:53         ` store reference detection (was Re: JARs and reference scanning) Thomas Danckaert
2017-04-26 19:31           ` Maxim Cournoyer
2017-04-27 13:46           ` Ludovic Courtès
2017-04-27 14:14             ` store reference detection Thomas Danckaert
2017-04-27 17:46             ` store reference detection (was Re: JARs and reference scanning) Hartmut Goebel
2017-05-02 12:43               ` Ludovic Courtès
2017-05-07 12:48                 ` Hartmut Goebel
2017-05-07 20:23                   ` Chris Marusich
2017-05-08  7:06                     ` Ricardo Wurmus
2017-05-08 14:11                       ` Ludovic Courtès
2017-05-11  8:41                       ` Chris Marusich
2017-05-11 11:27                         ` Ricardo Wurmus
2017-05-12  6:54                           ` Chris Marusich
2017-05-12  8:21                             ` Ricardo Wurmus
2017-05-12  9:35                         ` Hartmut Goebel
2017-05-12 18:22                           ` Mark H Weaver
2017-05-12 20:05                             ` Hartmut Goebel
2017-05-12 21:24                               ` Mark H Weaver
2017-05-12  6:18                   ` Mark H Weaver
2017-05-12  8:19                     ` Chris Marusich
2017-05-12  9:46                       ` store reference detection Hartmut Goebel
2017-05-12 17:39                       ` Mark H Weaver [this message]
2017-05-12 18:27                         ` store reference detection (was Re: JARs and reference scanning) Leo Famulari
2017-05-12 19:54                         ` Hartmut Goebel
2017-05-12 21:51                           ` Mark H Weaver
2017-05-13  7:15                             ` Hartmut Goebel
2017-05-23  7:29                               ` Chris Marusich
2017-04-25  8:44   ` Need help from Java-developers Ricardo Wurmus

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=87inl6ht4p.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.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.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.