Repository navigation
Delete the reader's own copy of the prints when removing fingerprints - #16403
Conversation
A match-on-chip reader keeps the enrolled prints in the device as well as in /var/lib/fprint, and fprintd finds the device's copies only through its local records. So removal now deletes them with fprintd-delete while fprintd still runs, before the local files go. It authenticates sudo in view first, since the delete's output is captured; a refusal changes nothing. A delete that finds no reader is said plainly, and one that fails is reported without stopping the removal. The enrolment instructions also move to short lines, since the setup terminal wraps a long one mid-word. Split out of omacom#16360, which builds the Touch ID hooks on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge; no blocking issues were found. SummaryDeletes fingerprints from the reader before removing local records and packages.
Since the last review, only a redundant test assertion was removed. No new actionable issues or rule violations were found. No previous review threads were supplied. Reviews (2) · Last reviewed commit: "Drop the width check that measured the t..." · Reviewed by Greptile |
The loop read the expected instruction the test passes in, not what setup printed, so it could only fail if someone edited the test's string; the exact-output match above already holds setup to that text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Reviewed at f157fec. The removal logic holds up; what's left is seeing it delete the prints on a reader that stores them. What ran, on a disposable Omarchy worker with no fingerprint reader:
Pushed: f157fec drops the 80-column loop in Second opinion: Codex Medium and muse-spark-1.3-contributor (via pi, thinking high) each reviewed it twice. Both flagged the loop above, and on the second round both found nothing open. Their other notes were cosmetic or need a sudo setup Omarchy doesn't ship: a bare colon if fprintd-delete fails with no output, and a prompt hidden inside the captured delete only when What it's waiting on — @scottjones, a run on a match-on-chip reader: no worker has one, so the on-chip delete is the one part nobody has seen work. On your Mac's Touch ID, or any reader that stores prints on the chip:
A reply here with the result and the SHA you tested is what this needs before it goes to the maintainer. |
|
Thanks. I ran it on two Macs with Touch ID, which keeps prints in the Secure Enclave. The removal script was this branch's: at
One caveat: I don't know whether Touch ID's libfprint driver checks for duplicates at enrolment. If it doesn't, a successful re-enrol doesn't prove the old print left the enclave, only that nothing refused. I didn't run the Not yet tried on x86 with a USB reader. 🤖 Generated with Claude Code |
|
Thanks for running it on both Macs. Nothing has landed since f157fec, so the code review above still stands; this is only about what your result shows. What it shows: on two Touch ID readers, removal ran What it doesn't yet: as you say, a re-enrol that nobody refused doesn't tell us the old print left the enclave. And sudo's log shows the delete was called, not that it succeeded: removal hides The one thing that decides it: did either run print a yellow warning — "The reader's own copy of … may not have been deleted: …" or "No fingerprint reader is available now …"? No yellow line means fprintd reported the delete done on the reader. If there was one, paste it here. If you no longer have the output, running Codex Medium read your reply against the script separately and came to the same conclusion; it could see this review as it worked, so that agreement isn't fully independent. This waits on your answer to that question before it goes to the maintainer. |
maralcbr
left a comment
There was a problem hiding this comment.
Approving at f157fec. The split is right: this PR now holds only the parts that change every platform.
- Removal authenticates sudo in view, then runs
fprintd-deletewhile fprintd still runs and before/var/lib/fprint/<user>goes. A refused sudo changes nothing, and a failed or reader-less delete is reported without stopping removal. - The 80-column enrolment lines change only the line breaks.
For the maintainer: removal on every platform now asks for sudo up front and deletes the reader's own copy of the prints. That is a behaviour change, so it needs your explicit OK.
Merge note: #16360 is stacked on this branch. Once this is squash-merged, #16360 needs a rebase onto quattro, or it conflicts in docs/file-layout.md and test/shell.d/security-fingerprint-remove-test.sh. Cherry-picking its own commit c075239 onto the squashed result applies cleanly.
Removing fingerprints left the prints on any reader that stores them on the chip. A match-on-chip reader (a Mac's Touch ID, and some Synaptics and Goodix USB readers) keeps each enrolled print in the device as well as in
/var/lib/fprint. fprintd only finds the device's copies through those local records, so once removal has deleted the records, nothing can delete the copies on the reader.fprintd-deletewhile fprintd still runs, before the local files go.rm -rfand the package drop). A refusal now stops it before anything changes, where before it could stop partway through the PAM edits.This is split out of #16360 at a maintainer's request: these parts change every platform, and #16360 now carries only the Touch ID hooks on top of them.
Evidence
test/shell.d/security-fingerprint-remove-test.shandfingerprint-package-test.shpass in ubuntu:24.04 as root and as a normal user, and so dofingerprint-invitation-test.shandsecurity-polkit-faillock-test.sh, which also run these scripts.Each new case fails against a deliberate break:
$USER;rm -rf;fprintd's
utils/delete.cwas checked:sudo sends PAM prompts to
/dev/tty, so a second prompt inside the captured delete still reaches the user.Test plan
bash test/shell.d/security-fingerprint-remove-test.shandfingerprint-package-test.shpassMerge Danger
Door: two-way
Blast Radius: low. Every platform's fingerprint removal now asks for sudo before it starts and runs
fprintd-deletefirst. The enrolment text changes only in its line breaks.🤖 Generated with Claude Code