Repository navigation
Add SELinux policy module so confined fprintd can reach the fingerprint broker - #65
Open
frozenSolid wants to merge 1 commit into
Open
frozenSolid wants to merge 1 commit into
frozenSolid wants to merge 1 commit into
Conversation
On SELinux-enforcing systems (Fedora, RHEL) fprintd runs confined as fprintd_t and cannot open /run/t1bridge/fingerprint.sock, so enrollment and verification fail with "fingerprint broker connection failed". Add a CIL module that gives the socket a dedicated type and allows fprintd to write to and connect through that socket only, with systemd allowed to create and remove it. Document install, verification and removal in docs/setup.md. Tested on MacBookPro13,3, Fedora 45, kernel 7.2.15, SELinux enforcing: claim with zero AVC denials and verify-match with a real touch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On SELinux-enforcing systems with the targeted policy (Fedora, RHEL and derivatives), fprintd
runs confined as
fprintd_t. The patched libfprint driver inside fprintd cannot open thebroker's socket, so Touch ID never gets past claiming the device:
Change
packaging/selinux/t1bridge_fprintd.cil: a small CIL policy module (no compiler needed). Itgives
/run/t1bridge/fingerprint.socka dedicated type,t1bridge_fingerprint_sock_t,instead of the generic
var_run_t, and allows only:init_tto create/label/remove that socket (systemd ownst1bridge-fingerprint.socket),plus
tmpfsassociation for/run;fprintd_ttowrite/getattrthat socket type only;fprintd_ttoconnecttothe socket's owner:init_tbefore activation andunconfined_service_t(the bin_t broker) after.docs/setup.md: a short "SELinux (Fedora, RHEL)" subsection under the import section withthe symptom, install/verify/remove commands, and what the module does and doesn't change.
No code, PAM, broker sandbox, or socket changes. The module grants nothing beyond the existing,
already-justified fprintd → broker connection. Arch (no SELinux) is unaffected.
A first version allowed
fprintd_tto write anyvar_run_tsock_file. I narrowed it to thededicated type before proposing it; both were tested.
Testing
MacBookPro13,3, Fedora 45, kernel 7.2.15-300.fc45, selinux-policy-targeted 45.23-1, SELinux
enforcing, T1Bridge built from
81cbdf8, libfprint/fprintd rebuilt from Fedora's 1.94.100 /1.94.5 sources with this repository's packaging patches.
semodule -i):t1bridge-fingerprint.socketrestarts;ls -Zshowst1bridge_fingerprint_sock_t;enroll-completed, then sudo and GNOME lock-screen unlock by touch withpassword fallback still working (done while the first, broader
var_run_trule was loaded);fprintd-verifyclaims the device with zero AVC denials, and areal touch returns
verify-match;semodule -r t1bridge_fprintdrestores the original behavior.🤖 Generated with Claude Code