arcfour encryption stream filter crashes php
| Sec Bug #72535 | arcfour encryption stream filter crashes php | ||||
|---|---|---|---|---|---|
| Submitted: | 2016-07-03 05:55 UTC | Modified: | 2017-10-27 18:05 UTC | ||
| From: | terrafrost at gmail dot com | Assigned: | derick (profile) | ||
| Status: | Closed | Package: | mcrypt related | ||
| PHP Version: | 7.0.8 | OS: | * | ||
| Private report: | No | CVE-ID: | None | ||
[2016-07-03 05:55 UTC] terrafrost at gmail dot com
Description: ------------ I don't think encryption filters are a very well known feature of mcrypt but none-the-less they are a feature: http://php.net/manual/en/filters.encryption.php The example in the PHP docs (with tripledes) works but arcfour does not work - you try to run it and you get a segfault. Test script: --------------- <?php $passphrase = 'My secret'; $plaintext = 'Secret secret secret data'; $iv = substr(md5('iv' . $passphrase, true), 0, 8); $key = substr(md5('pass1' . $passphrase, true) . md5('pass2' . $passphrase, true), 0, 24); $opts = array('iv' => $iv, 'key' => $key, 'mode' => 'stream'); $expected = substr($plaintext . $plaintext, 0, 48); $fp = fopen('php://memory', 'wb+'); stream_filter_append($fp, 'mcrypt.arcfour', STREAM_FILTER_WRITE, $opts); fwrite($fp, $plaintext); Expected result: ---------------- The script to actually run Actual result: -------------- The script crashes
Patches
mcrypt-filter-uaf (last revision 2017-01-10 12:52 UTC by leigh@php.net)Pull Requests
History
AllCommentsChangesGit/SVN commits
[2016-07-03 13:07 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: mcrypt related +Package: Reproducible crash -Operating System: Windows 10 +Operating System: *
[2016-07-03 13:07 UTC] cmb@php.net
[2016-07-04 02:50 UTC] kalle@php.net
-Status: Verified +Status: Feedback
[2016-07-04 19:28 UTC] cmb@php.net
-Status: Feedback +Status: Open
[2016-07-04 19:28 UTC] cmb@php.net
[2016-07-05 11:13 UTC] cmb@php.net
-Status: Open +Status: Verified
[2016-07-10 14:55 UTC] cmb@php.net
-Type: Bug +Type: Security -Private report: No +Private report: Yes
[2016-07-10 14:55 UTC] cmb@php.net
[2016-07-10 22:06 UTC] stas@php.net
-Package: Reproducible crash +Package: mcrypt related
[2016-07-18 07:23 UTC] stas@php.net
[2016-08-02 08:16 UTC] stas@php.net
-Assigned To: +Assigned To: derick
[2017-01-10 13:04 UTC] leigh@php.net
[2017-01-20 12:25 UTC] leigh@php.net
[2017-10-24 05:24 UTC] kalle@php.net
-Status: Verified +Status: Assigned
[2017-10-24 05:49 UTC] stas@php.net
[2017-10-27 18:05 UTC] ab@php.net
-Status: Assigned +Status: Closed