[personal profile] mjg59
There's a decent number of laptops with fingerprint readers that are supported by Linux, and Gnome has some nice integration to make use of that for authentication purposes. But if you log in with a fingerprint, the moment you start any app that wants to access stored passwords you'll get a prompt asking you to type in your password, which feels like it somewhat defeats the point. Mac users don't have this problem - authenticate with TouchID and all your passwords are available after login. Why the difference?

Fingerprint detection can be done in two primary ways. The first is that a fingerprint reader is effectively just a scanner - it passes a graphical representation of the fingerprint back to the OS and the OS decides whether or not it matches an enrolled finger. The second is for the fingerprint reader to make that determination itself, either storing a set of trusted fingerprints in its own storage or supporting being passed a set of encrypted images to compare against. Fprint supports both of these, but note that in both cases all that we get at the end of the day is a statement of "The fingerprint matched" or "The fingerprint didn't match" - we can't associate anything else with that.

Apple's solution involves wiring the fingerprint reader to a secure enclave, an independently running security chip that can store encrypted secrets or keys and only release them under pre-defined circumstances. Rather than the fingerprint reader providing information directly to the OS, it provides it to the secure enclave. If the fingerprint matches, the secure enclave can then provide some otherwise secret material to the OS. Critically, if the fingerprint doesn't match, the enclave will never release this material.

And that's the difference. When you perform TouchID authentication, the secure enclave can decide to release a secret that can be used to decrypt your keyring. We can't easily do this under Linux because we don't have an interface to store those secrets. The secret material can't just be stored on disk - that would allow anyone who had access to the disk to use that material to decrypt the keyring and get access to the passwords, defeating the object. We can't use the TPM because there's no secure communications channel between the fingerprint reader and the TPM, so we can't configure the TPM to release secrets only if an associated fingerprint is provided.

So the simple answer is that fingerprint unlock doesn't unlock the keyring because there's currently no secure way to do that. It's not intransigence on the part of the developers or a conspiracy to make life more annoying. It'd be great to fix it, but I don't see an easy way to do so at the moment.

Apple devices also need PIN/password

Date: 2023-12-05 07:19 am (UTC)
From: (Anonymous)
Your analysis is true.

However: Apple devices also need PIN/password for the first login after reboot. Only after that, you can use biometrics for unlocking. (Windows Hello is different in that regard, but also considered much less secure, even though it is tied to the TPM 2.0.)

The same should work on a laptop with Gnome. When you log in the first time, it asks for the keyring password. But when the laptop is running or sleeping, you can unlock with biometrics because the keyring is already unlocked.

I wish I could login and unlock the keyring on Gnome with my PGP smartcard. Authentication with PAM (libpam-poldi) works, but unfortunately no one wrote the glue code for unlocking the keyring.
It would be a perfect setup to decrypt both LUKS and later the keyring with PGP. Many people have Yubikeys, Nitrokeys etc. nowadays.

Re: Apple devices also need PIN/password

Date: 2023-12-05 07:54 am (UTC)
From: (Anonymous)
Also not entirely true. Afaik at least iPhones are very happy to let you login with only biometrics if you set it that way. Granted, that makes it less secure but the reason is still the same as in the OP. (I don’t want to check right now if it also unlocks passwords, but assume it does)

Re: Apple devices also need PIN/password

Date: 2023-12-05 08:05 am (UTC)
From: (Anonymous)
This is wrong. iPhone SE 2020 user here—rebooting the phone will not let me unlock the phone until the PIN is entered correctly.

Touch ID simply doesn’t work until the PIN is entered at least once after booting up.

Re: Apple devices also need PIN/password

Date: 2023-12-05 08:07 am (UTC)
From: (Anonymous)
Reboot an iPhone, and try to unlock it with your fingerprint. It'll always pop up the keypad with a message saying that entering your PIN is required after the iPhone is restarted.

Re: Apple devices also need PIN/password

Date: 2023-12-07 04:45 pm (UTC)
lovingboth: (Default)
From: [personal profile] lovingboth
Same with a Google Pixel. It will let you do without a PIN / password / drawn shape almost of the rest of the time, but will insist on you do it after about a week or two of use. Usually when you need to unlock your phone quickly.

Re: Apple devices also need PIN/password

Date: 2023-12-05 08:07 am (UTC)
From: (Anonymous)
Indeed, that's how I use it as well. For anyone who'd like to work on making the UX better (even if we can't enhance the security properties in the short term we can at least make it less confusing) then useful tickets are https://gitlab.gnome.org/GNOME/gdm/-/issues/619 https://gitlab.freedesktop.org/libfprint/fprintd/-/issues/23 and https://gitlab.gnome.org/GNOME/gdm/-/issues/613

Nick

SDCP

Date: 2023-12-05 09:35 am (UTC)
From: (Anonymous)
there is a way to communicate securely with the Fingerprint sensor, SDCP: https://github.com/microsoft/SecureDeviceConnectionProtocol

This is what Windows Hello uses in Windows machines.

Re: SDCP

Date: 2023-12-05 11:32 am (UTC)
From: (Anonymous)

This also requires manufacturers to implement it properly, where some, like Microsoft, apparently can’t be trusted to do that:

https://www.theverge.com/2023/11/22/23972220/microsoft-windows-hello-fingerprint-authentication-bypass-security-vulnerability

Fingertips and fingertips readers aren't secure

Date: 2023-12-05 09:02 pm (UTC)
From: (Anonymous)
First, fingertips readers are not secure:
https://arstechnica.com/gadgets/2023/11/researchers-beat-windows-hello-fingerprint-sensors-with-raspberry-pi-and-linux/
Second, fingertips is something you have, you can be forced touch reader and unlock device. You can't be as easily compelled to provide password.
sweh: (Default)
From: [personal profile] sweh
The three factors; something you've forgotten, something you've lost, something you've had chopped off.

Date: 2023-12-06 06:22 pm (UTC)
From: (Anonymous)
Looks like GNOME devs may be working on a path to fix this: https://thisweek.gnome.org/posts/2023/12/twig-124/

Relevant text is: `The team is collaborating with systemd for TPM backed secrets encryption and storage for the desktop keyring`
`

The other OS

Date: 2023-12-07 12:56 pm (UTC)
From: [identity profile] gedmin.as
How does Windows do it? When I use my fingerprint to log in, I'm not prompted for any passwords before it connects to my WiFi. Does Windows just store things like wifi passwords in plain text?

Re: The other OS

Date: 2024-01-30 10:46 pm (UTC)
From: (Anonymous)
Yes. The WiFi password is stored in plaintext.

Date: 2023-12-10 04:19 pm (UTC)
From: [identity profile] https://openid-provider.appspot.com/neversphere
> We can't use the TPM because there's no secure communications channel between the fingerprint reader and the TPM, so we can't configure the TPM to release secrets only if an associated fingerprint is provided.

Is there no privative in fingerprint readers to sign a blob only when a valid fingerprint is provided? If so you could do something like:

1) Gnome tells the TPM to start an unlock action
2) TPM generates a nonce which includes time, returns it so Gnome
3) OS sends this off to fingerprint reader
4) OS prompts the user to touch their fingerprint
5) Fingerprint matches, reader signs the nonce, returns it to OS
6) OS returns it to TPM
7) TPM verifies signature, ensures time is within acceptable window, returns secret

Some laptops have inbuilt FIDO

Date: 2024-02-04 09:16 am (UTC)
From: (Anonymous)
Recent Thinkpads have FIDO devices built in, they're part of the fingerprint sensor. This is even advertised by Lenovo.

Could the opposite not be done?

Date: 2024-08-27 10:43 pm (UTC)
From: (Anonymous)
To make this more seamless, one could maybe pull a trick from FileVault's book and perhaps wrap a copy of all interactive user password hashes with the TPM (using PCRs to validate a secure boot chain) to implement a pre-boot login prompt to both decrypt the disk and pass the input password to PAM afterwards to log in.

This way, the user need only enter a passphrase to initially get in but can then use their fingerprint sensor thereafter to do match-on-host processing of fingerprints. After all, if a switched on laptop is stolen after LUKS is unlocked, even on a desktop lock screen, it's usually going to be vulnerable to data remanence attacks anyway.

Profile

Matthew Garrett

About Matthew

Power management, mobile and firmware developer on Linux. Security developer at Aurora. Ex-biologist. [personal profile] mjg59 on Twitter. Content here should not be interpreted as the opinion of my employer. Also on Mastodon.

Expand Cut Tags

No cut tags