Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 6 Jun 2013 14:19:50 +1000
From: Michael Samuel <>
To: Solar Designer <>
Subject: Re: CVE Request: pwgen

I've done some further analysis of the program after reading the previous
thread, and I think there needs to be CVEs and fixes for:

- When used from a non-tty passwords are trivially weak by default (first
reported by Solar Designer)
- Phonemes mode has heavy bias and is enabled by default (first reported by
Solar Designer)
- Silent fallback to insecure entropy (first reported by Jean-Michel
Vourgère) (Debian bug #672241 - tagged as "wishlist")
- Secure mode has bias towards numbers and uppercase letters

I've attached a patch that fixes most issues - it doesn't solve the bias
towards numbers, because it's caused by requiring at-least one number per
password - so in an 8 character password there'd have to be 0.1 numbers to
avoid bias.  There's an argument to be made for removing the at-least-one
rule, but if the system that password is being used with has those rules,
it doesn't fix the problem anyway.  Perhaps a separate flag for that?

The changes are:

- Print a message and abort() of there's trouble opening or reading
/dev/urandom (So apport should pick up any packages that have been using
insecure entropy)
- Make "-s" the default
- Add an argument --insecure-phonemes (or -P)
- Non-tty passwords are now as secure as tty
- Require lower-case characters be present to even out some bias
- Pull in passwdqc as a Suggests on the debian package - pwqgen can
generate sane random passphrases

I can't imagine any reasonable use-case for the non-tty defaults (except
maybe combining with espeak as an enhanced interrogation technique), and
you can be certain that there's some people out there with it embedded in a
script that's generating useless passwords.

For phonemes mode in general, the bias is extreme, there are a limited
number of possible combinations and it is generally not suitable for
security purposes.  I have some fairly detailed analysis of it, but I
believe this list has a no-exploits policy...


On 28 May 2013 11:47, Solar Designer <> wrote:

> On Tue, May 28, 2013 at 01:33:48AM +0000, Michael Samuel wrote:
> > The default mode of this program generates extremely low entropy
> passwords -
> > It is probably worth changing the default to "secure" mode and removing
> > phonemes mode, to avoid putting users at risk.
> Yes.  You have seen the thread on pwgen from last year, right? -
> (Use the "thread-prev" link for more messages from that thread.)
> Alexander

Content of type "text/html" skipped

Download attachment "pwgen-security.patch" of type "application/octet-stream" (6141 bytes)

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.