Bug 1098783 - BIND only supports IDNA 2003 but not IDNA 2008
Summary: BIND only supports IDNA 2003 but not IDNA 2008
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bind
Version: 27
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Petr Menšík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1449151 (view as bug list)
Depends On:
Blocks: fedora28-switch-to-idna2008
TreeView+ depends on / blocked
 
Reported: 2014-05-18 14:01 UTC by Robert Scheck
Modified: 2018-04-09 19:09 UTC (History)
5 users (show)

Fixed In Version: bind-9.11.3-2.fc27 bind-9.11.3-4.fc28 bind-9.11.3-5.fc28 bind-9.11.3-3.fc27 bind-9.11.3-6.fc28 bind-9.11.3-4.fc27
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1560974 (view as bug list)
Environment:
Last Closed: 2018-04-09 13:26:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch #1 sent to upstream revorking the IDN code and adding support for libidn (18.60 KB, patch)
2015-09-23 16:11 UTC, Tomáš Hozza
no flags Details | Diff
patch #2 sent to upstream adding support for libidn2 (7.82 KB, patch)
2015-09-23 16:12 UTC, Tomáš Hozza
no flags Details | Diff
Modified libidn2 patch for bind master (11.06 KB, patch)
2017-08-11 13:56 UTC, Petr Menšík
no flags Details | Diff
Improved libidn2 for bind master (27.74 KB, patch)
2017-08-16 17:37 UTC, Petr Menšík
pemensik: review?
Details | Diff

Description Robert Scheck 2014-05-18 14:01:59 UTC
Description of problem:
BIND only supports IDNA 2003 but not IDNA 2008 as it seems:

$ host -t A straße.de
strasse.de has address 72.52.4.90
$

Uhm? Okay, let's have a look:

$ idn straße.de
strasse.de
$ 

$ host -t A strasse.de
strasse.de has address 72.52.4.90
$ 

But using IDNA 2008:

$ idn2 straße.de
xn--strae-oqa.de
$ 

$ host -t A xn--strae-oqa.de
xn--strae-oqa.de has address 109.234.109.21
xn--strae-oqa.de has address 109.234.109.20
xn--strae-oqa.de has address 213.128.138.236
$ 

Version-Release number of selected component (if applicable):
bind-9.9.5-3.fc21

How reproducible:
Everytime, see above and below.

Actual results:
$ host -t A straße.de
strasse.de has address 72.52.4.90
$ 

Expected results:
$ host -t A straße.de
xn--strae-oqa.de has address 109.234.109.21
xn--strae-oqa.de has address 109.234.109.20
xn--strae-oqa.de has address 213.128.138.236
$ 

Additional info:
Why was IDNA 2003 rather 2008 implemented? Did I overlook something? See
also: http://www.icann.org/en/resources/idn/idn-guidelines-02sep11-en.htm

Comment 1 Tomáš Hozza 2014-05-26 11:24:37 UTC
Hi.

Thank you for the report. The reason is mostly that nobody complained about
BIND not using IDNA2008 before.

Comment 2 Robert Scheck 2014-05-26 11:31:24 UTC
Tomas, thank you for the feedback. I am of course also happy to support/test 
things not only to complain :) So please let me know if I can support things.

Comment 3 Tomáš Hozza 2014-05-26 11:40:49 UTC
(In reply to Robert Scheck from comment #2)
> Tomas, thank you for the feedback. I am of course also happy to support/test 
> things not only to complain :) So please let me know if I can support things.

No problem. I just found out that the IDN support using libidn is hard-coded
in BIND, so it will take some time. But I'll let you know and update the bug
status once I finish.

I see that you are the owner of libidn(2). Do you track the packages still
using libidn instead of libidn2? Maybe it would be useful to migrate all
packages (if it makes sense) to the newer IDNA2008. For example I also own
wget and it still uses libidn. Maybe you could submit a Fedora Feature
for that... Just a thought :)

Comment 4 Robert Scheck 2014-05-26 11:52:38 UTC
I meanwhile did some analysis which raises new issues as it seems: libidn
was integrated into the GLIBC, however libidn2 not. Thus just replacing at
all places libidn by libidn2 in regular userland doesn't seem to solve it
completely.

Additionally it seems like libidn has IDN -> ACE and ACE -> IDN - while at
libidn2 has only IDN -> ACE - at least if I am not mistaken. This could be
a show-stopper for e-mail clients (where ACE -> IDN is required, everybody
wants to see the shiny fancy IDN domain for received e-mails, I guess). As
it is also affecting e.g. reverse DNS (you could put an IDN domain to PTR),
I need to discuss that with libidn2 upstream. I remember I talked to Simon 
Josefsson face to face some years ago about that but I do not really recall
the result anymore :-(

Comment 5 Tomáš Hozza 2014-05-26 12:57:09 UTC
I see. Well in the worst case scenario the libidn would have to be used for
ACE -> IDN conversion. However I don't know how this would work.

Since the use of libidn is Fedora specific, I asked ISC if they are be
willing to incorporate the functionality into BIND and make it compile-time
option. Hope they will be not against it. I would solve two issue with this!

For the record, the Feature request is:
[ISC-Bugs #36101] IDN support in host/dig/nslookup using GNU libidn(2)

Comment 6 Jaroslav Reznik 2015-03-03 17:01:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 7 Jan Kurik 2015-07-15 14:40:29 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 8 Tomáš Hozza 2015-09-23 16:11:50 UTC
Created attachment 1076263 [details]
patch #1 sent to upstream revorking the IDN code and adding support for libidn

Thanks to Jakub Luzny for helping me with this!

Comment 9 Tomáš Hozza 2015-09-23 16:12:50 UTC
Created attachment 1076264 [details]
patch #2 sent to upstream adding support for libidn2

Thanks to Jakub Luzny for helping me with this!

Comment 10 Tomáš Hozza 2015-09-23 16:15:18 UTC
Just a small note for Robert. Unfortunately the libidn2 does not support translation from punycode to Unicode. This is a showstopper for having this by default in Fedora. However we will at least try to get the support to upstream, so you can compile your own version if you need to. Sorry for that.

Comment 11 Tomáš Hozza 2015-11-18 10:15:23 UTC
moving to POST to reflect that the changes as pending upstream acceptance.

Comment 12 Jan Kurik 2016-02-24 15:35:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 13 Mike McCune 2016-03-28 23:39:55 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 14 Jan Kurik 2016-07-26 05:08:42 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 16 Fedora Admin XMLRPC Client 2016-12-01 14:21:21 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 17 Robert Scheck 2017-03-28 14:52:03 UTC
If I got Nikos Mavrogiannopoulos right, the issue raised in comment #4
and comment #10 (lack of translation from punycode to unicode) should be
addressed with future libidn2 versions which are even API compatible to
libidn (did not verify or test this myself yet).

Comment 18 Tomáš Hozza 2017-05-09 09:58:58 UTC
*** Bug 1449151 has been marked as a duplicate of this bug. ***

Comment 19 Nikos Mavrogiannopoulos 2017-08-03 09:51:19 UTC
Hi,
 Not sure what is the upstream status, but as the parent bug mentions all the deficiencies of libidn2 (punicode->ACE missing) have been addressed in Fedora. It is now even possible to switch a libidn application to libidn2 by changing the header idna.h -> idn2.h.

Comment 20 Petr Menšík 2017-08-11 13:56:55 UTC
Created attachment 1312153 [details]
Modified libidn2 patch for bind master

Removes iconv usage, translates directly into ACE names. Fixes tests/system/nslookup

Comment 21 Nikos Mavrogiannopoulos 2017-08-11 14:18:03 UTC
Thanks. Looks good to me.

Comment 22 Jan Kurik 2017-08-15 06:36:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 23 Petr Menšík 2017-08-16 10:52:41 UTC
Since Bind bugs are now open to public, a link to bug is available: https://bugs.isc.org/Public/Bug/Display.html?id=36101

Comment 24 Tomáš Hozza 2017-08-16 11:03:39 UTC
(In reply to Petr Menšík from comment #20)
> Created attachment 1312153 [details]
> Modified libidn2 patch for bind master
> 
> Removes iconv usage, translates directly into ACE names. Fixes
> tests/system/nslookup

Did you post this rebased patch to the upstream?

Comment 25 Nikos Mavrogiannopoulos 2017-08-16 12:31:19 UTC
Thanks for posting the link. Note however that the following text from the bug report:
> As noted before, the behavior with libidn2 is expected, since libidn2 does not support translation from punycode to Unicode. 

is not accurate. Since libidn2 2.0.0, it supports translation from punycode to unicode (with exactly the same API as libidn).

Comment 26 Petr Menšík 2017-08-16 17:37:16 UTC
Created attachment 1314258 [details]
Improved libidn2 for bind master

Fixed few issues with previous patch. Better auto detection for older libidn2, turning off +idnout for old versions. This patch was actually sent to upstream. 
Reports also decoding failures directly on console. Add option to turn off idn decoding by +noidnin parameter, removes previous IDN_DISABLE environment variable support.

Comment 27 Robert Scheck 2017-08-17 10:55:04 UTC
Does attachment #1314258 [details] handle both ways like comment #25 mentions?

Comment 28 Nikos Mavrogiannopoulos 2017-08-17 12:04:32 UTC
I haven't done any testing but going through it, it looks very good, and does many simplifications. I'd drop completely the libidn support (who needs IDNA2003 today), but I guess that's up to upstream to decide.

Comment 30 Petr Menšík 2017-12-07 17:09:27 UTC
You are right, no other communication was made. I made another request [ISC-Bugs #46788]. I am afraid it will not be part of upcoming 9.12 release.

Comment 32 Petr Menšík 2018-02-24 11:46:23 UTC
Created upstream merge request at gitlab [1]. It requires some tests for verifying implementation is not broken. Have you any good examples that should be tested as part of dig? Read discussion on gitlab for more.

[1] https://gitlab.isc.org/isc-projects/bind9/merge_requests/56/diffs

Comment 33 Nikos Mavrogiannopoulos 2018-03-05 14:12:21 UTC
Followed up there with a potential test suite.

Comment 34 Petr Menšík 2018-03-22 13:04:53 UTC
Merge request was accepted upstream, patch in Fedora package replaces old libidn support for libidn2 support.

Comment 35 Fedora Update System 2018-03-22 13:07:20 UTC
bind-9.11.3-4.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c92d7a2d4e

Comment 36 Fedora Update System 2018-03-22 14:15:04 UTC
bind-9.11.3-4.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c92d7a2d4e

Comment 37 Fedora Update System 2018-03-22 19:02:16 UTC
bind-dyndb-ldap-11.1-10.fc27 dnsperf-2.1.0.0-14.fc27 bind-9.11.3-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0b6bcf4f5b

Comment 38 Fedora Update System 2018-03-23 17:46:38 UTC
bind-9.11.3-2.fc27, bind-dyndb-ldap-11.1-10.fc27, dnsperf-2.1.0.0-14.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0b6bcf4f5b

Comment 41 Fedora Update System 2018-03-27 20:05:33 UTC
bind-9.11.3-2.fc27, bind-dyndb-ldap-11.1-10.fc27, dnsperf-2.1.0.0-14.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 42 Fedora Update System 2018-04-01 00:42:43 UTC
bind-9.11.3-4.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 43 Peter Robinson 2018-04-02 07:21:24 UTC
Actually I think this is now broken for the above usecase. Looks like a simple dependency update was missed in the spec when the patch landed:

-BuildRequires:  libidn-devel, libxml2-devel, GeoIP-devel
+BuildRequires:  libidn2-devel, libxml2-devel, GeoIP-devel

A "rpm -qR bind-utils" against bind-utils-9.11.3-4.fc28 shows no idn (libidn or libidn2) dependencies at all. Petr I think this was just an oversight?

Comment 44 Petr Menšík 2018-04-03 09:36:29 UTC
Sure, I forgot enabling libidn2 correctly in spec, used patch is insufficient. Fixing it and disabling again +idnout translation by default to keep backward compatibility.

Comment 45 Fedora Update System 2018-04-03 11:38:37 UTC
bind-9.11.3-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d4206a8c61

Comment 46 Fedora Update System 2018-04-03 11:39:32 UTC
bind-9.11.3-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-8276446105

Comment 47 Fedora Update System 2018-04-03 15:53:00 UTC
bind-9.11.3-3.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-8276446105

Comment 48 Fedora Update System 2018-04-03 15:59:30 UTC
bind-9.11.3-5.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-d4206a8c61

Comment 49 Petr Menšík 2018-04-04 12:17:14 UTC
Found another issue with IDN. Libidn2 is not intentionally propagated to exported libraries including libisc, that are reported by isc-config.sh --libs isc. Fix pending on https://gitlab.isc.org/isc-projects/bind9/merge_requests/170

Comment 50 Fedora Update System 2018-04-05 11:48:44 UTC
bind-9.11.3-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 51 Petr Menšík 2018-04-05 14:07:33 UTC
Reopening, all bind subpackages got linked to libidn2, which it should not.

echo libs-lite: && rpm -q --requires bind-libs-lite | grep libidn2
libidn2.so.0()(64bit)

but should be empty.

Comment 52 Fedora Update System 2018-04-05 16:26:58 UTC
bind-9.11.3-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-9bec30fe9a

Comment 53 Fedora Update System 2018-04-05 16:28:44 UTC
bind-9.11.3-6.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e22373ab30

Comment 54 Fedora Update System 2018-04-05 23:58:00 UTC
bind-9.11.3-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 55 Fedora Update System 2018-04-06 17:17:16 UTC
bind-9.11.3-4.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-9bec30fe9a

Comment 56 Fedora Update System 2018-04-06 18:55:51 UTC
bind-9.11.3-6.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e22373ab30

Comment 57 Fedora Update System 2018-04-09 13:26:32 UTC
bind-9.11.3-6.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 58 Fedora Update System 2018-04-09 19:09:03 UTC
bind-9.11.3-4.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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