php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3226 This code makes PHP segfault Apache
Submitted: 2000-01-16 19:06 UTC Modified: 2000-02-06 10:16 UTC
From: john at fbi dot hu Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.13 OS: Debian Linux 2.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: john at fbi dot hu
New email:
PHP Version: OS:

 

 [2000-01-16 19:06 UTC] john at fbi dot hu
The script is at
http://www.levele.com/devel/test/crash_source.txt
Save it as a .php3 file.

It should display "Start" then "Go..." then "End".
But it rarely reaches "End", it makes Apache segfault before that.
 If it seems to be ok (getting to the End), try reloading it more, 10-20 times.

 Verified on two machines. If you don't see the error, I'll provide more info.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-16 19:24 UTC] john at fbi dot hu
Okay, so Apache doesn't stop, but it's an Apache-child
that segfaults. You can see that in Apache's error.log
 [2000-01-18 12:46 UTC] john at fbi dot hu
Okay. So it seems as there's a bug in the functions 
base64_encode(); when calling it many times.

 Check the code below, and reload it 10-20 times!
 It should make a few seg.fault messages in the apache error.log


<?php

echo "<html><body>Start<br>";
flush();

for ($c=0;$c<4000;$c++) {
 $a = "a+ly6XM";
 $b = base64_decode($a);
}
echo "End<br>";


?>

 [2000-01-19 16:52 UTC] john at fbi dot hu
I've also heard that this affects PHP4 b2 and b3.
Didn't verify that, though.

 [2000-02-06 10:16 UTC] thies at cvs dot php dot net
fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 13:01:29 2024 UTC