RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: php
Version: 6.7
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Remi Collet
QA Contact: Petr Šplíchal
URL:
Whiteboard:
Depends On:
Blocks: 1254457 1269913
TreeView+ depends on / blocked
 
Reported: 2015-09-05 22:39 UTC by Robert Scheck
Modified: 2021-01-14 09:24 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 21:39:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0842 0 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.