php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52101 dns_get_record() - garbage in 'ipv6' field
Submitted: 2010-06-16 18:29 UTC Modified: 2010-06-17 11:27 UTC
From: grawity at gmail dot com Assigned: pajoye (profile)
Status: Closed Package: Network related
PHP Version: 5.3.2 OS: Windows XP SP3
Private report: No CVE-ID: None
 [2010-06-16 18:29 UTC] grawity at gmail dot com
Description:
------------
When calling dns_get_record($host, DNS_AAAA) for a single specific hostname ("snowflake.nullroute.eu.org"), random garbage is appended to the 'ipv6' field of the DNS response.

The DNS response itself is valid (tested using Wireshark).

<tshark-output filter="udp port 53">
192.168.1.94 -> 8.8.8.8      DNS Standard query AAAA snowflake.nullroute.eu.org
     8.8.8.8 -> 192.168.1.94 DNS Standard query response AAAA 2001:470:1f0b:614:2ff:76ff:fe90:0
</tshark-output>

PHP 5.3.2 (cli) (built: Mar  3 2010 20:47:01)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Test script:
---------------
<?php
foreach (dns_get_record('snowflake.nullroute.eu.org', DNS_AAAA) as $r)
    var_dump($r['ipv6']);


Expected result:
----------------
string(33) "2001:470:1f0b:614:2ff:76ff:fe90::"

Actual result:
--------------
string(37) "2001:470:1f0b:614:2ff:76ff:fe90:XXXXX"

(where XXXXX is five random bytes)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-16 19:21 UTC] johannes@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: pajoye
 [2010-06-17 02:14 UTC] felipe@php.net
On linux I got:
string(33) "2001:470:1f0b:614:2ff:76ff:fe90::"
 [2010-06-17 11:26 UTC] pajoye@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=300510
Log: - Fix bug #52101, dns_get_record()garbage in 'ipv6' field
 [2010-06-17 11:27 UTC] pajoye@php.net
-Status: Assigned +Status: Closed
 [2010-06-17 11:27 UTC] pajoye@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 05:01:29 2024 UTC