makepasswd hangs

Bug #1573974 reported by Thibault Richard
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Fix Released
Medium
Unassigned
makepasswd (Ubuntu)
Fix Released
Medium
Colin Watson

Bug Description

The version included in 16.04 LTS is hanging

My installation is brandnew (not an upgraded version). I've installed the package simply with apt-get install

Result of strace shows

brk(0x22d5000) = 0x22d5000
read(4, " do {\n $random = $sel"..., 8192) = 8192
read(4, "m_bytes );\n my $random_bytes_"..., 8192) = 8192
read(4, "ovide better\nperformance. If yo"..., 8192) = 8192
read(4, "oc command.\n\n perldoc Bytes::"..., 8192) = 1532
read(4, "", 8192) = 0
close(4) = 0
getuid() = 0
geteuid() = 0
getgid() = 0
getegid() = 0
brk(0x22f6000) = 0x22f6000
read(3, "n $Error.\n#\n\n$Error and do\n{\n\t$E"..., 8192) = 8046
brk(0x2317000) = 0x2317000
brk(0x2316000) = 0x2316000
read(3, "", 8192) = 0
close(3) = 0
stat("/var/run/egd-pool", 0x1f74298) = -1 ENOENT (No such file or directory)
stat("/dev/egd-pool", 0x1f74298) = -1 ENOENT (No such file or directory)
stat("/etc/egd-pool", 0x1f74298) = -1 ENOENT (No such file or directory)
stat("/etc/entropy", 0x1f74298) = -1 ENOENT (No such file or directory)
stat("/dev/random", {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 8), ...}) = 0
geteuid() = 0
open("/dev/random", O_RDONLY) = 3
ioctl(3, TCGETS, 0x7ffd30197fa0) = -1 EINVAL (Invalid argument)
lseek(3, 0, SEEK_CUR) = 0
fstat(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 8), ...}) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
read(3, "\201\34\3743\254\367onb\"\311\233\260mc\351\\$\232\253", 32) = 20
read(3, "\331\363\207\t\360\360", 12) = 6
read(3,

And after a while

read(3, ^Cstrace: Process 2017 detached
 <detached ...>

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: makepasswd 1.10-10
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Sat Apr 23 13:15:32 2016
InstallationDate: Installed on 2016-04-21 (1 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.3)
PackageArchitecture: all
SourcePackage: makepasswd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Thibault Richard (thibs) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in makepasswd (Ubuntu):
status: New → Confirmed
Revision history for this message
Jo Liss (joliss42) wrote :

The "hanging" behavior seems to be happening because makepasswd reads from /dev/random. A workaround is to mash keys or move the mouse to generate entropy. This only works if you have physical access to the machine. It doesn't work if you're logged in via SSH.

The man page for makepasswd advertises that makepasswd uses /dev/urandom. I believe/assume that this was the behavior in 14.04, since I've only had this problem in 16.04. I'd like to suggest changing it back to /dev/urandom.

Changed in makepasswd (Ubuntu):
importance: Undecided → Medium
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Scott Emmons (lscotte) wrote :

It looks like this change was a result of Debian bug 792535 [1], which switched the implementation from Crypt::OpenSSL::Random to Bytes::Random::Secure [2].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792535
[2] https://alioth.debian.org/scm/loggerhead/users/cjwatson/makepasswd/trunk/revision/39

Colin Watson (cjwatson)
Changed in makepasswd (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Colin Watson (cjwatson)
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package makepasswd - 1.10-11

---------------
makepasswd (1.10-11) unstable; urgency=medium

  * Switch to git; update Vcs-* fields.
  * Use /dev/urandom as intended and documented, not /dev/random
    (LP: #1573974).

 -- Colin Watson <email address hidden> Sat, 10 Feb 2018 02:04:29 +0000

Changed in makepasswd (Ubuntu):
status: Fix Committed → Fix Released
Changed in hundredpapercuts:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.