From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 022233858C62; Fri, 25 Aug 2023 15:21:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 022233858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692976863; bh=WeVMiR4CNFbOD+1XvbbuY9j3CN0i9AW16J9aBHe1GDg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wSAJCCBrb9mrsTH9fWZAtQ9aBN9fo4lHpwl8gQ87DeWJ0NS+Pvfn26eS4tWDFRY6j atn52QBf8Pfqy+4aYNlz8zoQVf/QG4z8HZ/5PCaIBfkOxfztrBFU9p8hmnFi+phk+W HmuG8VLfZLWRjJqi1/Nc4hnfzg2RNJzU2+Dh8FMM= From: "rgoldber at redhat dot com" To: elfutils-devel@sourceware.org Subject: [Bug debuginfod/28204] extend webapi / verification with forthcoming signed-contents archives Date: Fri, 25 Aug 2023 15:21:02 +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 #23 from Ryan Goldberg --- (In reply to Mark Wielaard from comment #22) > This still feels odd. Since you cannot distinguish between non-sig f36 > package (okish?) and non-sig f38 packages (bad?). I think you have to eit= her > trust or reject all non-sig packages from such a server. I see where you're coming from but what policy would you use for https://debuginfod.fedoraproject.org? We'd have to ignore then, which seems like one of the primary users of such verification might just skip it all together. > I'll look at the code to see if I understand what this means in practice. > Are those the messages presented to the user (in verbose mode? always?). = And > does this mean all three cases warn (or only the second and third)? And is > it just a message or does it also mean actual rejection in some cases? 2008 if(NULL !=3D url_ima_policies && ignore !=3D url_ima_policies[commit= ted_to]) 2009 { 2010 int result =3D debuginfod_validate_imasig(c, target_cache_tmppath,= fd); 2011 if(0 =3D=3D result) 2012 { 2013 if (vfd >=3D 0) dprintf (vfd, "the signature is valid\n"); 2014 } 2015 else if(EINVAL =3D=3D result || enforcing =3D=3D url_ima_policies[committed_to]) 2016 { 2017 // All invalid signatures are rejected. 2018 // Additionally in enforcing mode any non-valid signature is rejected, so by reaching 2019 // this case we do so since we know it is not valid. Note - this= not just invalid signatures 2020 // but also signatures that cannot be validated 2021 if (vfd >=3D 0) dprintf (vfd, "ALERT: this download is being rej= ected since the IMA signature could not be verified\n"); 2022 rc =3D -EPERM; 2023 goto out2; 2024 } 2025 else 2026 { 2027 // By default we are permissive, so since the signature isn't invalid we 2028 // give it the benefit of the doubt 2029 if (vfd >=3D 0) dprintf (vfd, "the signature could not be verified\n"); 2030 } 2031 } 2032=20 Here is the relevant snippet --=20 You are receiving this mail because: You are on the CC list for the bug.=