** Changed in: remmina (Ubuntu)
Status: New => Confirmed
** Changed in: remmina (Ubuntu Noble)
Status: New => Confirmed
** Changed in: remmina (Ubuntu Resolute)
Status: New => Confirmed
** Changed in: remmina (Ubuntu Stonking)
Status: New => Confirmed
** Description changed:
[ Impact ]
- When smartcard logon is active, the RDP plugin sources FreeRDP_Password
- from the ordinary "password" field. A PIN stored in the dedicated
- "smartcard_pin" field is never sent to the card middleware. If the user
- only sets a PIN and not a password (standard for smartcard users), the
- empty password is transmitted as the PIN, not allowing the user to
- login. On hardware keys (ie Yubikeys), this counts to the PIN retry
- limit.
+ Remmina's RDP connection profiles have two fields relevant to smartcard
+ logon: "Password" and "Smartcard PIN". When "Use a smartcard for logon" is
+ enabled, FreeRDP uses the password it is given as the smartcard PIN.
+ Remmina always fills that value from the Password field and never reads
+ the Smartcard PIN field.
+
+ As a result, a PIN saved in the Smartcard PIN field is ignored when
+ connecting. A user who configures smartcard logon the way the profile
+ editor suggests (Smartcard PIN filled in, Password left empty) cannot
+ connect with the saved PIN. Remmina falls back to a separate PIN prompt
+ on every connection. Saving the PIN from that prompt does not help, as the
+ saved value is ignored again on the next connection.
+
+ The only way to connect without a prompt today is to type the PIN into the
+ Password field, which is not discoverable.
+
+ The fix makes Remmina use the Smartcard PIN field when smartcard logon is
+ enabled and a PIN has been saved, and use the Password field in every other
+ case. It is a cherry-pick of upstream commit 1f43541c, first released in
+ Remmina 1.4.44.
[ Test Plan ]
Requirements:
- - Windows instance with RDP enabled and a smartcard added for login.
- - Ubuntu instance with Remmina installed.
+ * A Windows host joined to an Active Directory domain, with RDP enabled
+ and smartcard logon working for a test user (certificate issued by AD CS
+ and enrolled on the card).
+ * An Ubuntu client with Remmina, pcscd and opensc installed, and the
+ smartcard or hardware key (e.g. a YubiKey with PIV) attached.
+ * The card's PIN.
- To Test:
+ Reproduce the bug (current package):
- - Put in your Windows server's name into the "Server" field, the Windows
user's username into the "Username" field, and the AD domain into the "Domain"
field (if applicable). Do not enter a password.
- - Check the radio button labeled "Use a smartcard for logon" and enter your
PIN in the "Smartcard PIN" field.
- - Click "Save and Connect", the initial connection attempt will fail, and a
dialog box will pop up asking for a smartcard PIN. Putting the PIN in here will
work.
-
+ 1. Create a new RDP profile. Set Server, Username and Domain. Leave
+ Password empty.
+ 2. Tick "Use a smartcard for logon" and enter the PIN in "Smartcard PIN".
+ 3. Click "Save and Connect".
+
+ Result: the saved PIN is not used. Remmina shows the "Enter RDP SmartCard
+ PIN" prompt, and the session only starts after the PIN is entered there.
+
+ Verify the fix:
+
+ 1. Enable -proposed and upgrade remmina and remmina-plugin-rdp.
+ 2. Fully quit Remmina, including the tray icon.
+ 3. Connect using the profile from the steps above.
+
+ Expected: the session starts without any PIN prompt.
+
+ 4. For a YubiKey, run "ykman piv info" before and after connecting.
+ Expected: "PIN tries remaining" is unchanged.
+
+ Additional regression checks. Each must behave exactly as it did with
+ the current package:
+
+ a. Smartcard logon disabled, password in the Password field: connects
+ using the password.
+ b. Smartcard logon enabled, PIN in the Password field, Smartcard PIN field
+ empty (the existing workaround): connects without a prompt.
+ c. Profile with "passwordispin=1" added under [remmina] in the .remmina
+ file, PIN in the Password field, Smartcard PIN field empty: connects
+ without a prompt.
+ d. Smartcard logon through a Remote Desktop Gateway, with no separate
+ gateway username, password or domain set: gateway authentication
+ behaves as it did before the upgrade.
[ Where problems could occur ]
- This patch copies the smartcards PIN into the password field before
- login when the "smartcard-logon" dialog box is checked and the PIN
- exists. In the event that the user needs both a PIN and a password to
- connect to the remote, this will overwrite the password field, causing a
- login failure.
+ The change is limited to the point where Remmina decides which saved value
+ to hand to FreeRDP as the password at connect time. It does not modify
+ saved profiles.
+
+ Behaviour only changes when both of these are true:
+
+ * smartcard logon is enabled ("Use a smartcard for logon", or the
+ profile-only "passwordispin" option), and
+ * the Smartcard PIN field is not empty.
+
+ Profiles without smartcard logon, or with an empty Smartcard PIN field,
+ take exactly the same code path as before.
+
+ Within that, the following could regress:
+
+ * If the Smartcard PIN field holds an outdated PIN (for example one saved
+ from the PIN prompt before the card's PIN was changed), Remmina will now
+ send it automatically on every connection. Previously that value was
+ only used to pre-fill the PIN prompt. Each attempt with a wrong PIN uses
+ up one of the card's PIN retries, so repeated connections could lock
+ the card. The user can fix this by correcting or clearing the
+ gives the gateway the same password as the host. With this change, that
+ value becomes the smartcard PIN whenever one is saved, where it was
+ previously the contents of the Password field. A setup that relies on
+ the Password field for gateway authentication while also saving a PIN
+ could fail at the gateway. Regression check (d) covers this case.
+
+ * Users of "passwordispin" who also have a value saved in the Smartcard
+ PIN field will now have that value used instead of the Password field.
[ Other Info ]
- Upstream commit:
+ Upstream issue: https://gitlab.com/Remmina/Remmina/-/issues/3501
+ Upstream commit:
https://gitlab.com/Remmina/Remmina/-/commit/1f43541c30ece6ebaffda8ab5452ae4eacbfeb5e
+ First upstream release containing the fix: 1.4.44
-
https://gitlab.com/Remmina/Remmina/-/commit/1f43541c30ece6ebaffda8ab5452ae4eacbfeb5e
+ The patch applies to all target releases without modification.
- There are two workarounds:
+ Existing workarounds:
- 1) After the smartcard login fails the default login path, a dedicated popup
asks for the users PIN. Putting the PIN in here works, because it follows a
different code path.
- 2) Putting the PIN in the password field works, but is unintuitive.
+ 1. Enter the PIN in the prompt that appears after the initial attempt.
+ 2. Put the PIN in the Password field instead of the Smartcard PIN field.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2163414
Title:
[SRU] RDP: saved Smartcard PIN is ignored when connecting
To manage notifications about this bug go to:
https://bugs.launchpad.net/remmina/+bug/2163414/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs