Bug 2568044

Summary: fapolicyd fails to start with file-libs 5.48: suspected compiled magic database format mismatch
Product: [Fedora] Fedora Reporter: dev
Component: fapolicydAssignee: Steve Grubb <sgrubb>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 45CC: plautrba, rsroka, sgrubb
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of:
: 2569355 (view as bug list) 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:
Bug Depends On:    
Bug Blocks: 2569355    

Description dev 2026-11-06 06:17:29 UTC
On a Fedora 45 x86_64 VM, fapolicyd fails to start because it cannot load its packaged compiled magic database.

Observed November 4, 2026 with:
fapolicyd-2.0.1-1.fc45.x86_64
file-libs-5.48-3.fc45.x86_64

The failure occurred repeatedly with these installed versions.

Reproducible: Always

Steps to Reproduce:
1. Use Fedora 45 x86_64 with fapolicyd-2.0.1-1.fc45.x86_64 and file-libs-5.48-3.fc45.x86_64 installed.
2. Run: sudo systemctl start fapolicyd.service
3. Inspect: sudo journalctl -b -u fapolicyd.service --no-pager

The file-type detection failure was also reproduced independently of daemon startup using:
fapolicyd-cli --ftype /usr/bin/true
Actual Results:
The daemon checks its trust database successfully, then fails to load /usr/share/fapolicyd/fapolicyd-magic.mgc and exits.

Relevant journal messages (timestamps and hostname omitted):
Entries in trust DB: 31043
Loaded trust info from all backends (without duplicates): 31043
Trust database checks OK
Unable to load fast magic database
fapolicyd.service: Main process exited, code=exited, status=1/FAILURE
fapolicyd.service: Failed with result 'exit-code'.
Failed to start fapolicyd.service - File Access Policy Daemon.

Immediately before the magic database failure, libmagic reports invalid offsets on lines 1, 2 and 4 of /usr/share/fapolicyd/fapolicyd-magic.mgc. The first warning contains binary bytes beginning 1c 04 1e f1 14, represented here in hexadecimal for readability.

Expected Results:
The packaged magic database loads successfully, file-type inspection succeeds, and the daemon starts.

Additional Information:
rpm -V fapolicyd file-libs returned exit status 0 with no output.

A refreshed package upgrade attempt left both packages at the versions listed above, and the failure persisted.

The warning bytes appear to identify a compiled magic header with format version 20, whereas upstream file 5.48 defines format version 21:
https://github.com/file/file/blob/FILE5_48/src/file.h

This suggests a compiled database/library format mismatch; the exact packaging cause has not been confirmed.

fapolicyd 2.0.2 has not been tested.

Comment 1 Petr Lautrbach 2026-11-06 12:43:06 UTC
Are you able to reproduce it with fpaolicyd-2.0.2-1.fc45 from https://bodhi.fedoraproject.org/updates/FEDORA-2026-67d32ed434 ?

Comment 2 dev 2026-11-06 18:57:08 UTC
Yes, confirmed fixed!
When will it be released to Fedora 45's stable updates repo?