Bug 2545894

Summary: Fapolicyd blocks binutils ld although it should be trusted via rpm plugin
Product: [Fedora] Fedora Reporter: apalrd <andrew>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: MODIFIED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 44CC: dvlasenk, fweimer, jakub, josmyers, nickc, plautrba, rsroka, sgrubb, sipoyare, suraj.ghimire7
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: binutils-2.42.50-10 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description apalrd 2026-10-05 11:53:18 UTC
ld cannot be used when fapolicyd is enabled and trusting binaries from rpm. There is some disconnect between rpm -> fapolicyd on this.

I've been trying to trace * why * this happens - as far as I can tell, rpm is not submitting this particular file (/usr/bin/ld.bfd) to fapolicy. The other binutils (as, ... ) all work correctly, although none of those use the same symlink chain that /usr/bin/ld -> /etc/alternatives/ld -> /usr/bin/ld.bfd do.

rpm-plugin-fapolicyd is installed and working correctly
fapolicyd-cli update does not help
fapolicyd-cli --test-filter /usr/bin/ld.bfd indicates that it should be included by the filter, so it must have been missed upstream of this in rpm



Reproducible: Always

Steps to Reproduce:
1.install fapolicyd (dnf install fapolicyd)
2.enable fapolicyd (systemctl enable --now fapolicyd)
3.invoke the linker (ld) directly, or via gcc, as a non-root user
Actual Results:
"Operation Not Permitted"

Expected Results:
ld executes command

Comment 1 Petr Lautrbach 2026-10-05 12:37:51 UTC
See https://redhat.atlassian.net/browse/RHEL-238406

Comment 2 Steve Grubb 2026-10-05 15:07:38 UTC
There's not a whole lot of explanation in the referenced ticket. But the root cause is that the binutils spec file marks the linker as verify only the owner
https://src.fedoraproject.org/rpms/binutils/blob/f44/f/binutils.spec#_1383

To be included, it has to be marked as either:

%verify(not mtime) %{_bindir}/ld.bfd

or

%verify(owner filedigest) %{_bindir}/ld.bfd

fapolicyd excludes files where the maintainer knows the sha256 changes. That's not the case here, but points to a packaging issue.