|  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
Status: Closed Package: Network related
PHP Version: 5.3.2 OS: Windows XP SP3
Private report: No CVE-ID:
 [2010-06-16 18:29 UTC] grawity at gmail dot com
When calling dns_get_record($host, DNS_AAAA) for a single specific hostname (""), 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"> ->      DNS Standard query AAAA -> DNS Standard query response AAAA 2001:470:1f0b:614:2ff:76ff:fe90:0

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:
foreach (dns_get_record('', DNS_AAAA) as $r)

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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-16 19:21 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: pajoye
 [2010-06-17 02:14 UTC]
On linux I got:
string(33) "2001:470:1f0b:614:2ff:76ff:fe90::"
 [2010-06-17 11:26 UTC]
Automatic comment from SVN on behalf of pajoye
Log: - Fix bug #52101, dns_get_record()garbage in 'ipv6' field
 [2010-06-17 11:27 UTC]
-Status: Assigned +Status: Closed
 [2010-06-17 11:27 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 10:01:44 2015 UTC