From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AF13C3858C66; Mon, 31 Jul 2023 14:27:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF13C3858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1690813639; bh=FmiVaC8hpInzRhHqpV7Hm0z+zJOV+fIvlJhLeIojydc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jBJqa694xIQkqoECZoHr0oJC7FvxQdoRj99IMIgKY+8jpNm0XCcf/v/EhyxSX8/Ml Ub7XGUw+RTaMALzkRhFDVPBtaZShsMGkYgzdYknfPQZ3UiVci7B2C/pb7cjxyYQJv0 InDVQ3cCm/2VCmops0SNheyCoXFaav3A/JyDMzlw= From: "rgoldber at redhat dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: debuginfod X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rgoldber at redhat dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rgoldber at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D28204 --- Comment #16 from Ryan Goldberg --- (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 th= eir last lines. Would that not do the trick? > In debuginfod_validate_imasig the file_data =3D 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 crea= te > 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) chu= nks. Sure, just looked at the docs for EVP_DigestUpdate and seems like this chan= ge 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 co= de > 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 head= ers > 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 h= as been pretty tricky, so distributing a copy of these (at least early certificates) might be a good idea. Eventually the intention is for these c= erts to be shipped in a known location which we can easily add to the search pat= h, 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 n= eed to be quite so strict on rejection. Permissive won't allow incorrect signat= ures 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 mo= ving 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 li= ttle 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 t= hen 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 --=20 You are receiving this mail because: You are on the CC list for the bug.=