#18966 [Bgs]: gethostbyaddr() crashes Apache on certain IPs
| From: | php at silisoftware dot com | Date: | Mon, 19 Aug 2002 16:49:41 +0000 |
| Subject: | #18966 [Bgs]: gethostbyaddr() crashes Apache on certain IPs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17210@lists.php.net to get a copy of this message | ||
ID: 18966
User updated by: php@silisoftware.com
Reported By: php@silisoftware.com
Status: Bogus
Bug Type: Reproducible crash
Operating System: Windows XP Home (NT5.1b2600)
PHP Version: 4.2.2
New Comment:
Analog seems to have suffered a similar problem until v5.2:
http://www.analog.cx/bugs.html
"Analog occasionally crashes under Windows XP when doing DNS lookups,
if the host returns a malformed response."
If this is a similar case to what I'm experiencing, there's no way I
can filter out IPs that'll crash my system, but shouldn't PHP be able
to check for a properly formed response during the gethostbyaddr()
function?
Previous Comments:
------------------------------------------------------------------------
[2002-08-19 12:01:44] msopacua@idg.nl
This does have a very suspicious nameserver:
For authoritative answers, see:
mitsui.com 3600 IN SOA nyc0x001.mitsui.com
amonty.nyc.mitsui.com(
130 ;serial (version)
3600 ;refresh period
600 ;retry refresh this often
86400 ;expiration period
3600 ;minimum TTL
)
nyc0x001
But indeed - if Webalizer freaks out, the bug is probably in XP. You
may have stumbled upon something really nice here.
------------------------------------------------------------------------
[2002-08-19 11:21:00] edink@php.net
This is most likely a bug in your system. I run your script on a
Windows 2000 machine and it worked just fine. It simply printed
'208.133.226.85'.
------------------------------------------------------------------------
[2002-08-19 11:07:07] php@silisoftware.com
gethostbyaddr() crashes Apache (v1.3.24) when looking up certain IPs.
Example script:
echo gethostbyaddr('208.133.226.85');
Every other IP I've tried (so far about 40,000) didn't have any
problems. I tried the above line on another server running PHP4.2.2,
Apache v1.3.26 and some form of Linux (2.4.9-31) and that had no
problems.
Probably related: the Windows port of Webalizer crashes when performing
DNS lookups on the same line of the log file, so I suspect it's
something to do with DNS lookups in Windows (?).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18966&edit=1