Bug 2432574
| Summary: | glibc spec file's wrap-find-debuginfo.sh fails to seed/salt buildids | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Frank Ch. Eigler <fche> |
| Component: | glibc | Assignee: | Frédéric Bérat <fberat> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 45 | CC: | arjun, codonell, dj, fberat, fweimer, jlaw, josmyers, mcermak, mcoufal, mfabian, mjw, nickc, pfrankli, sam, sipoyare, skolosov, suraj.ghimire7 |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | glibc-2.43.9000-1.fc45 | Doc Type: | --- |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2026-08-17 14:32:23 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2362272 | ||
| Bug Blocks: | |||
|
Description
Frank Ch. Eigler
2026-01-24 18:36:22 UTC
Isn't this basically saying that the builds are too reproducible? We copy back libc.so.6 as it was before running find-debuginfo.sh, so that we can add a special .symtab for valgrind. See bug 1965374. This undoes any build-id change that find-debuginfo.sh may have made, breaking debuginfo linking if find-debuginfo.sh recomputes the build ID. I'm open to other suggestions for fixing this. On the other hand, the debuginfod behavior seems problematic because it seems to allow Fedora packages to deny debuginfo availability for unrelated packages. (In reply to Florian Weimer from comment #1) > Isn't this basically saying that the builds are too reproducible? You can still have completely reproducible builds by salting buildids with the n-v-r-a. > We copy back libc.so.6 as it was before running find-debuginfo.sh, so that > we can add a special .symtab for valgrind. See bug 1965374. This undoes any > build-id change that find-debuginfo.sh may have made, breaking debuginfo > linking if find-debuginfo.sh recomputes the build ID. OK, I only partly understand all this, but it appears as though your wrapper-generated libc.so's ALL end up with unsalted, gcc/ld-generated original buildids, rather than those recomputed by the wrapped debugedit/find-debuginfo.sh. Perhaps the wrapper could overwrite the buildid early on in its lib* saving/restoring process. (Wishful thinking, but these days, the ld --package-metadata=JSON field provides a perfect source of salt, but don't think ld consumes it that way. cc: nickc) > On the other hand, the debuginfod behavior seems problematic because it > seems to allow Fedora packages to deny debuginfo availability for unrelated > packages. That's true, there is a vulnerability to actively hostile packages, and to the occasional process mishap like this, but statistically not toward accident. (In reply to Frank Ch. Eigler from comment #2) > (Wishful thinking, but these days, the ld --package-metadata=JSON field > provides a perfect source of salt, but don't think ld consumes it that way. > cc: nickc) We currently do not have package notes (bug 2362272). If the linker includes allocated PT_NOTE segments in its build-id computation, generating the package notes, would fix this issue here, as well, right? I am not completely sure what is going on here and why it is an issue.
In theory build-ids are globally unique unless they are essentially the same build.
build-id clashes normally only occur when a binary is copied.
Being the same build shouldn't really be an issue since packages are build in a build directory containing their name and version (which will go into the debuginfo as paths and so create different hashes between packages and versions). The one thing not normally included is the release (the r in nvra). Different architectures obviously generate different build-ids.
I assume what is happening here is the release number isn't hashed into the binary, so the same package-version-r1 and package-version-r2 build get the same build-id (assuming the build environment is exactly the same). Which should in theory not really be an issue because it just means the binary doesn't technically need to be upgraded between releases. But no two binaries with the same build-id will ever be installed at the same time.
I am not sure why that would be an issue for ima signatures, since they are the same binary bit-for-bit the ima signature should be exactly the same.
For debuginfod it might indeed be unclear which "release" version if the debuginfo (or sources) to provide for such a build-id, but it really shouldn't matter. Either release debuginfo or sources should match the binary.
If you do want to make sure the build-id between releases of the same package-source always have different build-ids you can indeed use debugedit to update the build-id using --build-id --build-id-seed=%{VERSION}-%{RELEASE}. (Please don't use /dev/urandom which would make the package not-reproducible.)
I looked for a bit at the build-id computation in BFD ld, and I think the package notes added here https://src.fedoraproject.org/rpms/glibc/pull-request/148 should be covered by the hash. So I don't think we'll need separate seeding because the notes already contain a version-release string. > I am not sure why that would be an issue for ima signatures, since they are
> the same binary bit-for-bit the ima signature should be exactly the same.
The problem is that one of the koji builds was never submitted to bodhi as an
testing/stable-bound build. Therefore it never got signed, lacking IMA
signatures. Thus the latter were rejected when a debuginfod client happened
to receive them under the (now default) ima:enforcing policy.
There are a couple of OTHER links in the causality chain where this could have
been prevented, but this is one of the earliest.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 45 development cycle. Changing version to 45. Fixed as a side effect via:
commit fa430acd6d74dd155cc8d83f2bf90bbe290e3265
Author: Frédéric Bérat <fberat>
Date: Thu Jan 22 15:11:33 2026 +0100
Enable package notes for glibc and DSOs
Add `_package_note_flags` to `LDFLAGS`. This enables package notes for
glibc and its dynamic shared objects, providing build-time metadata in
the compiled binaries.
RHBZ#2362272
|