[Pkg-openssl-devel] Bug#861285: openssl enc -k path-for-keyphrase-file ...c does not fail if the keyphrase-file is missing.

ISHIKAWA,chiaki ishikawa at yk.rim.or.jp
Wed Apr 26 23:46:10 UTC 2017


Package: openssl
Version: 1.1.0e-1
Severity: major
Tags: upstream

Dear Maintainer,

*** Reporter, please consider answering these questions, where  
appropriate ***

    * What led up to the situation?

I ran the following command after setting up the
environment variables appropriately.

E.g.:

KFILE=path-for-passphrase-file      (say, ~/mypass)
BNAME=file-to-be-encrypted

openssl enc -k ${KFILE} -in  ${BNAME} -out ${BNAME}.enc -aes-256-cbc

To my surprise if ${KFILE} is missing, openssl does not complain
and seems to encrypt the input file anyway: but with what passphrase?!

    * What exactly did you do (or not do) that was effective (or
      ineffective)?

    * What was the outcome of this action?

We may end up with an encrypted file that noo ne can possibly decrypt !?
If, the intent is to remove the original file AFTER the encryption
takes place, then we lose the original file forever!

       Possible DATA LOSS. BAD!

    * What outcome did you expect instead?

I would rather see openssl complain that the passphrase file is
missing LOUD and CLEAR (and returns an error code. I checked that the  
following does not print "fail".

openssl enc -k ${KFILE} -in  ${BNAME} -out ${BNAME}.enc -aes-256-cbc  ||  
echo fail

)

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 9.0
   APT prefers stable-updates
   APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.19.5 (SMP w/4 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages openssl depends on:
ii  libc6      2.24-9
ii  libssl1.1  1.1.0e-1
ii  perl       5.24.1-2

openssl recommends no packages.

Versions of packages openssl suggests:
ii  ca-certificates  20161130

-- no debconf information



More information about the Pkg-openssl-devel mailing list