Bug 118126 - readfile segfaults with filesize of multiples of 4KB
readfile segfaults with filesize of multiples of 4KB
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: php (Show other bugs)
1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
http://www.manucorp.com/archives/php-...
:
Depends On: 123095
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-12 04:12 EST by Pytela, Zdenek
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-25 14:51:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
php+apache2 readfile segfault problem (764 bytes, patch)
2004-03-12 04:14 EST, Pytela, Zdenek
no flags Details | Diff

  None (edit)
Description Pytela, Zdenek 2004-03-12 04:12:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031030

Description of problem:
Function readfile() crashes with segfault when sending files with
filesize of multiples of 4KB. This bug is specific to apache2.
Red Hat 9 doesn't suffer with this bug.
This is PHP bug #27037. Please include patch enclosed to the next
cummulative update.

Version-Release number of selected component (if applicable):
4.3.3-6

How reproducible:
Always

Steps to Reproduce:
1. Run this code through apache2 and take a look into apache's error_log:

<?php
$fl = 4096*4;
$fn = "/tmp/file.tmp";
$fp = fopen ($fn, "wb");
fwrite ($fp,  str_repeat ('x', $fl), $fl);
fclose($fp);
readfile($fn);
?>

Web page is not displayed, certainly.

Actual Results:  error_log:
[notice] child pid 12345 exit signal Segmentation fault (11)


Expected Results:  Something in the web page, nothing in the error_log.

Additional info:
Comment 1 Pytela, Zdenek 2004-03-12 04:14:37 EST
Created attachment 98482 [details]
php+apache2 readfile segfault problem
Comment 2 Joe Orton 2004-03-12 05:41:30 EST
Thanks for the report.
Comment 3 Joe Orton 2004-05-25 14:51:43 EDT
Fixed in 4.3.6-1.1 update.

Note You need to log in before you can comment on or make changes to this bug.