Fedora Account System
Red Hat Associate
Red Hat Customer
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
See https://redhat.atlassian.net/browse/RHEL-238406
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.