Bug #79145 [NEW]: openssl memory leak
| From: | adriance at qq dot com | Date: | Tue, 21 Jan 2020 08:24:59 +0000 |
| Subject: | Bug #79145 [NEW]: openssl memory leak | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-225022@lists.php.net to get a copy of this message | ||
From: adriance at qq dot com
Operating system: CentOS 7
PHP version: 7.3.13
Package: OpenSSL related
Bug Type: Bug
Bug description:openssl memory leak
Description:
------------
2097152
8392704
14684160
25169920
29364224
31461376
50335744
52432896
54530048
56627200
Test script:
---------------
<?php
$b = '-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDaFhc31WeskqxwI+Si5R/fZrLK
pJOlABiI3RZfKCHJVrXl3IvcHDFM/BHKUJoSi/ee8GS9iw0G4Z1eCzJdthXxHARh
j85Q5OliVxOdB1LoTOsOmfFf/fdvpU3DsOWsDKlVrL41MHxXorwrwOiys/r/gv2d
C9C4JmhTOjBVAK8SewIDAQAC
-----END PUBLIC KEY-----';
for ($i = 0; $i < 1000000; $i++) {
if ($i % 100000 == 0) {
echo memory_get_usage(true) . PHP_EOL;
}
$a = openssl_get_publickey($b);
openssl_free_key($a);
}
--
Edit bug report at https://bugs.php.net/bug.php?id=79145&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79145&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79145&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79145&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79145&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79145&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79145&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79145&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79145&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79145&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79145&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79145&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79145&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79145&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79145&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79145&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79145&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79145&r=mysqlcfg