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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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 Dec 22 19:01:31 2024 UTC