public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "rgoldber at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug debuginfod/28204] extend webapi / verification with forthcoming signed-contents archives
Date: Mon, 31 Jul 2023 14:27:18 +0000	[thread overview]
Message-ID: <bug-28204-10460-66U1HFIHS9@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28204-10460@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28204

--- Comment #16 from Ryan Goldberg <rgoldber at redhat dot com> ---
(In reply to Mark Wielaard from comment #12)
> In config/profile.csh.in and config/profile.sh.in the prefix variable is
> explicitly set and no longer unset. Is that deliberate?
Taking a look at both files they seem to still contain `unset prefix` as their
last lines. Would that not do the trick?

> In debuginfod_validate_imasig the file_data = malloc(data_len); depends on
> the (externally) given file size. It is then read in one pread call. And the
> whole buffer is then given to EVP_DigestUpdate. Note that this might create
> a giant malloc buffer, which might trigger OOM. pread might succeed with
> fewer bytes than given. It needs to be called in a loop. But it would be
> better if we could read it and feed it to EVP_DigestUpdate in (small) chunks.
Sure, just looked at the docs for EVP_DigestUpdate and seems like this change
should be pretty straightforward.

> Is EACCESS the right error code to return when the signature couldn't be
> checked/is invalid? That is the same as when we get
> CURLE_REMOTE_ACCESS_DENIED. It might be good if it was an unique error code
> so users can know that the file was not trusted.
How do you feel about EPERM? Not exactly its usage but we've used up a good
number of the more applicable ones with the CURL errors (EACCESS, EINVAL)

(In reply to Mark Wielaard from comment #13)
> The configure checks might need to check whether the rpm development headers
> define the needed constants.
Sure

(In reply to Mark Wielaard from comment #14)
> I think it is the user/distro packager who should decide which ima-certs to
> ship. I don't think elfutils should come with ima-certs itself.
From what I've seen finding the correct certificates for IMA verification has
been pretty tricky, so distributing a copy of these (at least early
certificates) might be a good idea. Eventually the intention is for these certs
to be shipped in a known location which we can easily add to the search path,
but until then having a copy seems like the best bet imho.

> Why is there a "permissive" policy? What is the use case for this?
It might be that a user wants to be aware of what's going on but does not need
to be quite so strict on rejection. Permissive won't allow incorrect signatures
but will allow say an unsigned file whereas an enforcing client will reject
anything that does not come with a valid signature

> Should the policy be per debuginfod url? So you can point to an official
> distro debuginfod which must be in enforcing mode, but can add a local one
> with an "ignore" policy.
I was thinking of keeping things simple, but don't have anything against moving
to a per URL sort of approach. What kind of format would you want for such a
thing? For urls foo:bar:baz would we want something like ignore::enforcing
where blanks are the default? Don't love this structure since it seems a little
unwieldy. I'll think on a better format for it.

(In reply to Mark Wielaard from comment #15)
> But I must admit that I am a little lost in the rpm and koji mechanisms to
> extract those signatures. How easy will it be to extend to other platforms
> that might store such signatures in different ways?
The koji flag seems like a necessary evil in my opinion. At least the way it
works is that when the flag is enabled we try the koji storage method and then
fall back to the rpm itself, so to add another signature storage format we
could do the same method, so adding more shouldn't be too difficult. Might
require a little logic tweak but wouldn't think its too complex a change

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-07-31 14:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06 21:11 [Bug debuginfod/28204] New: " fche at redhat dot com
2021-08-12 18:13 ` [Bug debuginfod/28204] " fche at redhat dot com
2021-08-26 20:53 ` mark at klomp dot org
2021-09-08 11:26 ` fche at redhat dot com
2022-06-10 17:19 ` fche at redhat dot com
2022-07-13 19:44 ` rgoldber at redhat dot com
2022-07-14 16:32 ` fche at redhat dot com
2022-07-27 14:52 ` mark at klomp dot org
2022-08-04 19:45 ` rgoldber at redhat dot com
2022-10-20 21:10 ` mark at klomp dot org
2022-10-20 23:11 ` mark at klomp dot org
2023-07-06 19:49 ` rgoldber at redhat dot com
2023-07-23 21:05 ` mark at klomp dot org
2023-07-23 21:07 ` mark at klomp dot org
2023-07-23 21:08 ` mark at klomp dot org
2023-07-23 21:57 ` mark at klomp dot org
2023-07-23 22:23 ` mark at klomp dot org
2023-07-31 14:27 ` rgoldber at redhat dot com [this message]
2023-08-02 16:37 ` mark at klomp dot org
2023-08-07 17:04 ` fche at redhat dot com
2023-08-09 18:17 ` rgoldber at redhat dot com
2023-08-17 15:39 ` mark at klomp dot org
2023-08-17 16:25 ` rgoldber at redhat dot com
2023-08-25 15:00 ` mark at klomp dot org
2023-08-25 15:21 ` rgoldber at redhat dot com
2023-08-25 15:24 ` mark at klomp dot org
2023-08-25 16:43 ` mark at klomp dot org
2023-08-26 22:25 ` mark at klomp dot org
2023-08-28 14:40 ` rgoldber at redhat dot com
2023-08-29 13:09 ` mark at klomp dot org
2024-06-03 15:28 ` fche at redhat dot com

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=bug-28204-10460-66U1HFIHS9@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).