Package: pass
Version: 1.7.3-2
Severity: normal

Since the bullseye upgrade (at least?), `pass generate` has been
complaining like this:

anarcat@curie:~$ pass generate foo
tr: write error: Broken pipe
tr: write error
[master xxxxxx] Add generated password for foo.
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo.gpg
The generated password for foo is:
[...]

This is probably because pass uses something like this to generate
passwords. I don't remember exactly what the code is anymore, but it's
the same in spirit:

pwge() {
    ENTROPY=${1:-20} # in bytes
    # strip possible newlines if output is wrapped and trailing = signs as they 
add nothing to the password's entropy
    head -c $ENTROPY /dev/random | base64 | tr -d '\n='
    echo
}


... and that code yields the same error.

Oddly, I cannot reproduce this issue anymore, as of this writing. It's
unclear to me what, exactly, is triggering this issue, because I
cannot reproduce it right now. But I've seen it often enough to
warrant a bug report.

I would be ready to bet this is due to entropy gathering. Maybe `tr`
fails when `/dev/random` isn't full enough?

Anyways, this was scary enough to warrant a bug report, in my humble
opinion. Feel free to close if you are more familiar with the issue
and do not witness the problem ever.

-- System Information:
Debian Release: 11.4
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable'), 
(1, 'unstable'), (1, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-16-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages pass depends on:
ii  gnupg  2.2.27-2+deb11u2
ii  tree   1.8.0-1+b1

Versions of packages pass recommends:
ii  git       1:2.30.2-1
ii  qrencode  4.1.1-1
ii  xclip     0.13-2

Versions of packages pass suggests:
ii  libxml-simple-perl  2.25-1
ii  perl                5.32.1-4+deb11u2
pn  python              <none>
ii  python3             3.9.2-3
ii  ruby                1:2.7+2

-- debconf-show failed

Reply via email to