Bug 1260315 - Wrong warning by PHP openssl_encrypt() for missing IV even IV is not required
Summary: Wrong warning by PHP openssl_encrypt() for missing IV even IV is not required
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: php   
(Show other bugs)
Version: 6.7
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Web Stack Team
QA Contact: Petr Šplíchal
URL:
Whiteboard:
Keywords: Patch, Upstream
Depends On:
Blocks: 1254457 1269913
TreeView+ depends on / blocked
 
Reported: 2015-09-05 22:39 UTC by Robert Scheck
Modified: 2016-06-01 01:45 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-10 21:39:01 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0842 normal SHIPPED_LIVE php bug fix update 2016-05-10 22:42:34 UTC

Description Robert Scheck 2015-09-05 22:39:58 UTC
Description of problem:
When running e.g. phpMyAdmin 4.4.14 on RHEL 6 this causes a warning:

  openssl_encrypt(): Using an empty Initialization Vector (iv) is potentially 
    insecure and not recommended

This however is not a bug in phpMyAdmin, but in PHP 5.3.3 as shipped by
RHEL 6 and is already fixed at upstream.

Finally, something like

  openssl_encrypt(str_repeat('.', 16), 'aes-256-ecb', str_repeat('a', 32), 
    true);

causes the warning while ECB mode doesn't make use of an IV.

Note: This requires phpMyAdmin 4.4.x as shipped by upstream, not the EPEL
package (which is 4.0.x due to the old MySQL version in RHEL 6). And this
also requires a MariaDB (either via SCL or remote).

Version-Release number of selected component (if applicable):
php-5.3.3-46.el6_6

How reproducible:
Everytime, see above and below.

Actual results:
Wrong warning of openssl_encrypt() for missing IV even IV is not required.

Expected results:
No warning.

Additional info:
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613815
- http://git.php.net/?p=php-src.git;a=commitdiff;h=412d15168192fdd3afafca5cff034bb5b451942f
- http://git.php.net/?p=php-src.git;a=commit;h=a4252ab2be8a0231477396fd475397b23a089d0e

Comment 1 Robert Scheck 2015-09-05 22:49:11 UTC
Cross-filed case/ticket 01503945 on the Red Hat customer portal.

Comment 3 Remi Collet 2015-09-10 11:26:24 UTC
Low risk patch (same code still used in latest versions)

Nice to have especially as we encourage the use of openssl extension for encryption (instead of dead mcrypt).

php-phpseclib test suite is a good reproducer.

Comment 5 Remi Collet 2015-12-09 15:22:19 UTC
Both reproducer from description and phpseclib test suite ok with linked patch.

Comment 11 errata-xmlrpc 2016-05-10 21:39:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0842.html


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