Re: [PATCH] one more possible seg fault in openssl
| From: | Wez Furlong | Date: | Wed, 27 Oct 2004 11:11:49 +0000 |
| Subject: | Re: [PATCH] one more possible seg fault in openssl | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13560@lists.php.net to get a copy of this message | ||
Committed; thanks!
On Wed, 27 Oct 2004 03:36:17 -0700, Kamesh Jayachandran
<kameshj@fastmail.fm> wrote:
> Hi Wez,
> <?php
> $dn = array(
> "countryName" => "UK",
> "stateOrProvinceName" => "Somerset",
> "localityName" => "Glastonbury",
> "organizationName" => "The Brain Room Limited",
> "organizationalUnitName" => "PHP Documentation Team",
> "commonName" => "Wez Furlong",
> "emailAddress" => "wez@example.com"
> );
> // Non-existent or null private key
> $csr = openssl_csr_new($dn, $privkey1);
> ?>
> will also cause the double free of privkey and hence potential seg
> fault.
> openssl_csr_new tries to create a fresh private key and adds to the
> resource list and fails to req.priv_key to null so the dispose function
> frees the private key generated. Later when the php_request_shutdown is
> called it agains frees the EG(regular_list) this causes the seg fault.
>
> Patch is available at,
> http://puggy.symonds.net/~kameshj/openssl.c.patch
>
> With regards
> Kamesh Jayachandran
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>