php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78008 dns_check_record() always return true on Alpine
Submitted: 2019-05-13 14:57 UTC Modified: 2019-11-07 13:14 UTC
Votes:12
Avg. Score:3.9 ± 1.0
Reproduced:12 of 12 (100.0%)
Same Version:4 (33.3%)
Same OS:11 (91.7%)
From: a dot suharevs at dyninno dot lv Assigned:
Status: Closed Package: *Network Functions
PHP Version: 7.3.11 OS: Alpine
Private report: No CVE-ID: None
 [2019-05-13 14:57 UTC] a dot suharevs at dyninno dot lv
Description:
------------
dns_check_record() always return true on systems based on MuslC libc, due to incorrect usage of Musl libc res_search() function in php_dns_search().

Here is the issue on alpine bugtracker: https://bugs.alpinelinux.org/issues/7392


Test script:
---------------
<?php
var_dump(dns_check_record('asdasda123123.123131'));

Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)

Patches

78008-dns_check_record-74.patch (last revision 2020-07-14 01:58 UTC by apostnikov at gmail dot com)
dns_check_record_patch_light (last revision 2019-05-13 16:13 UTC by a dot suharevs at dyninno dot lv)
dns_check_record_patch (last revision 2019-05-13 14:58 UTC by a dot suharevs at dyninno dot lv)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-05-13 15:25 UTC] danack@php.net
It's possible other people can read it, but to me that patch appears to be touching lots of lines that don't appear to be changed. e.g.

-#ifndef MAXPACKET
+#ifndef MAXPACKET

Which makes seeing the actual change quite hard. 

Is it possible for you to regenerate the patch as a smaller one?
 [2019-05-13 16:17 UTC] a dot suharevs at dyninno dot lv
Sure, uploaded new patch.
 [2019-05-20 12:57 UTC] a dot suharevs at dyninno dot lv
-PHP Version: 7.2.18 +PHP Version: 7.3.5
 [2019-05-20 12:57 UTC] a dot suharevs at dyninno dot lv
updated version
 [2019-06-03 09:47 UTC] a dot suharevs at dyninno dot lv
danack@php.net Any news regarding this fix?
 [2019-08-01 10:27 UTC] a dot suharevs at dyninno dot lv
-PHP Version: 7.3.5 +PHP Version: 7.4
 [2019-08-01 10:27 UTC] a dot suharevs at dyninno dot lv
Latest version of PHP have same problem
 [2019-11-07 13:14 UTC] nikic@php.net
-PHP Version: 7.4 +PHP Version: 7.3.11
 [2020-02-19 12:15 UTC] albert at noustique dot com
Would be great to have this merged, checkdnsrr() is not usable in Alpine right now. Thanks a lot!
 [2020-03-12 13:30 UTC] albert at noustique dot com
It should be noted that the return value of getmxrr() is also affected by this bug and not fixed by the patch.
 [2020-07-01 11:04 UTC] danielgomes at 3cket dot com
Any updates on this?
 [2020-07-08 18:27 UTC] ben at harrisuk dot com
It would be great to get an update on this!
 [2020-07-14 01:27 UTC] apostnikov at gmail dot com
Filed PR based on last patch https://github.com/php/php-src/pull/5854

Moreover dns_get_record() and getmxrr() both works fine for me on 7.3-7.4 Alpinelinux
 [2020-07-14 01:58 UTC] apostnikov at gmail dot com
The following patch has been added/updated:

Patch Name: 78008-dns_check_record-74.patch
Revision:   1594691919
URL:        https://bugs.php.net/patch-display.php?bug=78008&patch=78008-dns_check_record-74.patch&revision=1594691919
 [2020-07-15 13:11 UTC] nikic@php.net
Automatic comment on behalf of apostnikov@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2c57378bd3725b82ac1217b636e21e3006b5ca03
Log: Fix bug #78008: dns_check_record() always return true on Alpine
 [2020-07-15 13:11 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC