Bug 1039168 - Disallow non-ASCII characters in encryption passwords
Summary: Disallow non-ASCII characters in encryption passwords
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vratislav Podzimek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedFreezeException
Depends On:
Blocks: F20FinalFreezeException
TreeView+ depends on / blocked
 
Reported: 2013-12-06 19:50 UTC by Alexey Torkhov
Modified: 2015-06-30 01:25 UTC (History)
8 users (show)

Fixed In Version: anaconda-21.16-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-30 01:25:34 UTC
Type: Bug


Attachments (Terms of Use)

Description Alexey Torkhov 2013-12-06 19:50:12 UTC
Description of problem:
In anaconda rescue mode when entering encryption password there is no keymap selection UI. And in installer GUI it is possible to perform installation enter encryption password which does contain non-ASCII characters.
I think, installer should disallow to create new encryption partitions using non-ASCII password.

Anyway, this looks as a blocker according to:

The rescue mode of the installer must be able to detect and mount any installation performed according to the applicable criteria, and provide a shell with access to utilities capable of performing typical recovery operations. 

Version-Release number of selected component (if applicable):
anaconda-20.25.14-1.fc20.x86_64

Comment 1 Alexey Torkhov 2013-12-06 20:09:27 UTC
Probably this is separate issue from rescue, but anyway.

Using standard installer it is even possible to create such layout that will unable to mount all its encrypted partitions. It will happen if different partitions will have passwords from different keymaps (like Russian and Ukrainian). And in console it is possible to have only one keymap.

Blocks according to:
 In all of the above cases, if any system partitions were encrypted as part of the installation, the boot process must prompt for the passphrase(s) and correctly unlock the partition(s) when provided with the correct passphrase(s).

This is probably somewhat "madeup" scenario, but I think these issues shows that non-ASCII characters should not be allowed in encryption passwords.

Comment 2 Alexey Torkhov 2013-12-06 20:13:07 UTC
Note also, that even if my scenario (with russian-ukraine) is considered to be invalid, it should be rejected by anaconda as per:

 Reject or disallow invalid disk and volume configurations without crashing.

Comment 3 Alexey Torkhov 2013-12-06 20:14:51 UTC
And also, non-ASCII characters in root and user passwords are rejected, so why are the are accepted here?

Comment 4 Adam Williamson 2013-12-06 20:43:17 UTC
I think this might be a sane thing to do, but I'm not sure it really needs to block release. I'd probably be +1 FE if the patch is simple, though.

BTW, you could pass vconsole.keymap= on the cmdline to set a different keymap for rescue mode.

Comment 5 Alexey Torkhov 2013-12-07 20:56:47 UTC
Just nice to have feature. Removing blocker proposition.
Probably not very simple to patch because dialog might be reused in creation and opening existing partition. In latter case it should allow non-ASCII chars as they are allowed in previous versions.

Comment 6 Mike Ruckman 2013-12-09 18:46:50 UTC
Discussed in 2013-12-09 Blocker Review meeting [1]. Voted an AcceptedFreezeException. A safe change here would significantly improve our robustness against bugs in passphrase entry in various places, but we will only take a simple fix that demonstrably is limited to the codepath for creating a new encrypted volume.

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2013-12-09/

Comment 7 Vratislav Podzimek 2013-12-12 16:18:23 UTC
I'd like to add a few bits of information on this topic:
1. restricting passwords to ASCII-only characters reduces entropy quite a lot and I believe proper fix would remove this restriction from root and user passwords not add it to LUKS passwords

2. rescue mode may be run with e.g. inst.keyboard=ru to turn on Russian keymap for it

3. the loadkeys utility is available in rescue mode's shell allowing console keymap to be switched

4. setting different LUKS passwords with different X layouts is user's decision and the warning on the LUKS password dialog is quite explanatory as far as pontential risks go, I think

Comment 8 Alexey Torkhov 2013-12-12 16:33:08 UTC
(In reply to Vratislav Podzimek from comment #7)
> I'd like to add a few bits of information on this topic:
> 1. restricting passwords to ASCII-only characters reduces entropy quite a
> lot and I believe proper fix would remove this restriction from root and
> user passwords not add it to LUKS passwords

Looks fine from mine POV if bug 1039185 is also fixed, i.e. if default layout in which they would enter password is english both on X and console.

> 4. setting different LUKS passwords with different X layouts is user's
> decision and the warning on the LUKS password dialog is quite explanatory as
> far as pontential risks go, I think

Probably warning could be shown conditionally if entering password with non-ASCII layout or with caps lock pressed.

Comment 9 Vratislav Podzimek 2013-12-12 16:55:00 UTC
(In reply to Alexey Torkhov from comment #8)
> (In reply to Vratislav Podzimek from comment #7)
> > I'd like to add a few bits of information on this topic:
> > 1. restricting passwords to ASCII-only characters reduces entropy quite a
> > lot and I believe proper fix would remove this restriction from root and
> > user passwords not add it to LUKS passwords
> 
> Looks fine from mine POV if bug 1039185 is also fixed, i.e. if default
> layout in which they would enter password is english both on X and console.
Nice, that change will probably come with F21.

> 
> > 4. setting different LUKS passwords with different X layouts is user's
> > decision and the warning on the LUKS password dialog is quite explanatory as
> > far as pontential risks go, I think
> 
> Probably warning could be shown conditionally if entering password with
> non-ASCII layout or with caps lock pressed.
That's a good point. I believe CAPS lock warning already works (if not, it's an easy fix of one line in the right .glade file). But the non-ASCII warning definitely is a nice idea. There could be some warning with it's tooltip describing what may go wrong with such setup.

Comment 10 Adam Williamson 2013-12-13 00:30:34 UTC
A warning for passwords that use non-ASCII - and make it consistent between all password cases - would be a decent compromise, I guess. I'm not really sold on the 'reduces entropy' argument, there's certainly enough potential entropy in the whole ASCII character set and a passphrase that can be as long as you like; I think opening ourselves up to all sorts of possible keyboard layout issues forever and ever is a poor trade off for allowing a bit more entropy in password selection. But it's just MHO.

I dunno, you try and make life easier for people and they fight you as hard as they can ;)

Comment 11 Alexey Torkhov 2013-12-13 01:03:12 UTC
Thinking about it a bit more, it might be better to have solution that will be completely fool-proof. The very-very minor number of people who are consciously using non-ASCII password (nobody have seen one yet, by the way) may use system tools to change password.

Comment 12 Vratislav Podzimek 2013-12-13 08:18:05 UTC
(In reply to Adam Williamson from comment #10)> 
> I dunno, you try and make life easier for people and they fight you as hard
> as they can ;)
Sounds like a nice new flag for our bugzilla. :)

Comment 13 Vratislav Podzimek 2013-12-13 08:21:38 UTC
(In reply to Alexey Torkhov from comment #11)
> Thinking about it a bit more, it might be better to have solution that will
> be completely fool-proof. The very-very minor number of people who are
> consciously using non-ASCII password (nobody have seen one yet, by the way)
> may use system tools to change password.
I've seen quite a lot of Czech people using Czech keyboard layout and non-ASCII characters in their passwords. Let's not give it up too soon! I believe people are generally not so stupid to do crazy things when they REALLY WANT to install and use an OS. Two warnings should be enough. ;)

Comment 14 Vratislav Podzimek 2014-01-08 10:38:06 UTC
Patch adding the warning icon with a toolip to the LUKS password entry posted to anaconda-patches.

Comment 15 Vratislav Podzimek 2014-01-10 11:27:41 UTC
(In reply to Vratislav Podzimek from comment #14)
> Patch adding the warning icon with a toolip to the LUKS password entry
> posted to anaconda-patches.

Pushed to master.

Comment 16 Adam Williamson 2014-01-14 01:31:21 UTC
Looking at the commit, this still seems to be inconsistent between passphrase and account password: non-ASCII is warned (but allowed) for encryption passphrase, but disallowed for user password.

I can't see any convincing explanation for why that should be the case. We *really* ought to be using the same policies and code for all password creation during installation, it just seems to be a source of user confusion and potential bugs for us to have two or three different password creation dialogs, all following different policies.

Comment 17 Vratislav Podzimek 2014-01-14 17:41:05 UTC
I believe LUKS passphrase is quite special for mutliple reasons:
1) it really protects your data
2) it is entered in a weird environment
3) it needs a lot of entropy
4) it is the target of this bug report

And, honestly, I think having different policies for different passwords is a completely natural and widely used thing.

Comment 18 Fedora End Of Life 2015-05-29 09:56:00 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 19 Fedora End Of Life 2015-06-30 01:25:34 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.