Fedora Account System
Red Hat Associate
Red Hat Customer
Debuginfod server calls rpmReadPackageFile in order to verify IMA signatures. On Fedora 43 with rpm-5.99.90-4.fc43.x86_64 this results in a segfault due to rpmKeyringVerifySig2 attempting to lock a mutex from NULL keyring. With rpm-4.20.1-3.fc43.x86_64.rpm installed, files are successfully verified and no segfaults occur. I've attached a backtrace of the crash. Reproducible: Always Steps to Reproduce: I built elfutils on rawhide with debuginfod and ima verification enabled. I ran the testsuite and the tests in run-debuginfod-ima-verification.sh fail due to the rpmKeyringVerifySig2 segfault. Please let me know if you'd like a more detailed reproducer and I'll describe how to build elfutils and run the tests.
Created attachment 2087780 [details] backtrace.txt
Hey, thanks for reporting! This has sufficient info for fixing, the missing NULL check is rather obvious in the code. I'll look into it.
> Debuginfod server calls rpmReadPackageFile in order to verify IMA signatures. Note that rpmReadPackageFile() does NOT verify IMA signatures. Rpm itself never does. IMA verification only happens during an actual installation, if the IMA plugin is present and enabled.
Ignore the above note, re-reading more carefully debuginfod is reading the header *in order to* verify the IMA signatures (by itself). Upstream fix now at https://github.com/rpm-software-management/rpm/pull/3741
Fixed in rpm >= 5.99.90-5 now