Discussion:
[Dnsmasq-discuss] libidn2 issues with underscores on FreeBSD?
Matthias Andree
2017-07-06 20:51:34 UTC
Permalink
Simon,

with the release of v2.77, I have switched the FreeBSD port from IDN
(which was used up to and including 2.76) to IDN2, and have just
received a bug report where SRV records that use underscores are no
longer recognized, and the reporter states that disabling the IDN2
option reinstates the expected operation:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220521

Could you check that?

It appears we're using libidn2 v2.0.2 in FreeBSD, and previously used
libidn 1.33.

Thanks.

Best regards,
Matthias
Petr Menšík
2017-07-07 14:12:47 UTC
Permalink
Hi, I was the original contributor of IDN2 support.
I have to agree IDN2 does filter underscores out.

On Fedora 25:

$ idn2 --version
idn2 (libidn2) 2.0.2

$ idn2 -l _xmpp-server._tcp.domain.com
xmpp-server.tcp.domain.com

Not even transitional mode helps

$ idn2 -T _xmpp-server._tcp.domain.com
xmpp-server.tcp.domain.com

But older IDN works fine

$ idn --version
idn (GNU Libidn) 1.33

$ idn _xmpp-server._tcp.domain.com
_xmpp-server._tcp.domain.com

I will have have to ask why would it do that.

Another question is whether SRV records should be formatted by libidn2
when they will not be displayed to the user. I think it should affect
only logs but not served names themselves.
Post by Matthias Andree
Simon,
with the release of v2.77, I have switched the FreeBSD port from IDN
(which was used up to and including 2.76) to IDN2, and have just
received a bug report where SRV records that use underscores are no
longer recognized, and the reporter states that disabling the IDN2
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220521
Could you check that?
It appears we're using libidn2 v2.0.2 in FreeBSD, and previously used
libidn 1.33.
Thanks.
Best regards,
Matthias
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Simon Kelley
2017-07-08 20:27:33 UTC
Permalink
I considered not passing SRV record names to IDN, but I can forsee
more subtle problems (We allow _ in hostnames, for instance.) So I've
fixed this, for some value of "fixed", by not passing any domain name
being parsed, which has one or more underscores, to IDN.

That seems a reasonable solution.


http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=69a815aa8f4b91570b562a54b43c3d44ac533e06

Cheers,

Simon
Post by Petr Menšík
Hi, I was the original contributor of IDN2 support.
I have to agree IDN2 does filter underscores out.
$ idn2 --version
idn2 (libidn2) 2.0.2
$ idn2 -l _xmpp-server._tcp.domain.com
xmpp-server.tcp.domain.com
Not even transitional mode helps
$ idn2 -T _xmpp-server._tcp.domain.com
xmpp-server.tcp.domain.com
But older IDN works fine
$ idn --version
idn (GNU Libidn) 1.33
$ idn _xmpp-server._tcp.domain.com
_xmpp-server._tcp.domain.com
I will have have to ask why would it do that.
Another question is whether SRV records should be formatted by libidn2
when they will not be displayed to the user. I think it should affect
only logs but not served names themselves.
Post by Matthias Andree
Simon,
with the release of v2.77, I have switched the FreeBSD port from IDN
(which was used up to and including 2.76) to IDN2, and have just
received a bug report where SRV records that use underscores are no
longer recognized, and the reporter states that disabling the IDN2
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220521
Could you check that?
It appears we're using libidn2 v2.0.2 in FreeBSD, and previously used
libidn 1.33.
Thanks.
Best regards,
Matthias
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Petr Menšík
2017-08-09 20:28:02 UTC
Permalink
Hi Simon,

this issue was fixed in libidn2 release of version 2.0.3. You workaround
could be disabled for releases with IDN2_VERSION_NUMBER >= 0x02000003.

Attaching small example patch.

Cheers,
Petr
Post by Simon Kelley
I considered not passing SRV record names to IDN, but I can forsee
more subtle problems (We allow _ in hostnames, for instance.) So I've
fixed this, for some value of "fixed", by not passing any domain name
being parsed, which has one or more underscores, to IDN.
That seems a reasonable solution.
http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=69a815aa8f4b91570b562a54b43c3d44ac533e06
Cheers,
Simon
Post by Petr Menšík
Hi, I was the original contributor of IDN2 support.
I have to agree IDN2 does filter underscores out.
$ idn2 --version
idn2 (libidn2) 2.0.2
$ idn2 -l _xmpp-server._tcp.domain.com
xmpp-server.tcp.domain.com
Not even transitional mode helps
$ idn2 -T _xmpp-server._tcp.domain.com
xmpp-server.tcp.domain.com
But older IDN works fine
$ idn --version
idn (GNU Libidn) 1.33
$ idn _xmpp-server._tcp.domain.com
_xmpp-server._tcp.domain.com
I will have have to ask why would it do that.
Another question is whether SRV records should be formatted by libidn2
when they will not be displayed to the user. I think it should affect
only logs but not served names themselves.
Post by Matthias Andree
Simon,
with the release of v2.77, I have switched the FreeBSD port from IDN
(which was used up to and including 2.76) to IDN2, and have just
received a bug report where SRV records that use underscores are no
longer recognized, and the reporter states that disabling the IDN2
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220521
Could you check that?
It appears we're using libidn2 v2.0.2 in FreeBSD, and previously used
libidn 1.33.
Thanks.
Best regards,
Matthias
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
--
Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: ***@redhat.com PGP: 65C6C973
Matthias Andree
2017-08-17 18:38:19 UTC
Permalink
Post by Petr Menšík
Hi Simon,
this issue was fixed in libidn2 release of version 2.0.3. You workaround
could be disabled for releases with IDN2_VERSION_NUMBER >= 0x02000003.
Attaching small example patch.
Cheers,
Petr
Hi everybody,

FreeBSD's ports of libidn2 (head, and the "2017Q3" quarterly branch) are
now updated to libidn2 v2.0.3, and I have not touched the dnsmasq
package for FreeBSD.
I believe that should fix the issues on a fully updated FreeBSD system
within a week or so.

Petr, thank you for all this information, most useful.

Cheers,
Matthias
Simon Kelley
2017-09-25 15:56:18 UTC
Permalink
Patch tweaked so it's not active with IDN1 either, and applied. Thanks.


Simon.
Post by Petr Menšík
Hi Simon,
this issue was fixed in libidn2 release of version 2.0.3. You workaround
could be disabled for releases with IDN2_VERSION_NUMBER >= 0x02000003.
Attaching small example patch.
Cheers,
Petr
Post by Simon Kelley
I considered not passing SRV record names to IDN, but I can forsee
more subtle problems (We allow _ in hostnames, for instance.) So I've
fixed this, for some value of "fixed", by not passing any domain name
being parsed, which has one or more underscores, to IDN.
That seems a reasonable solution.
http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=69a815aa8f4b91570b562a54b43c3d44ac533e06
Cheers,
Simon
Post by Petr Menšík
Hi, I was the original contributor of IDN2 support.
I have to agree IDN2 does filter underscores out.
$ idn2 --version
idn2 (libidn2) 2.0.2
$ idn2 -l _xmpp-server._tcp.domain.com
xmpp-server.tcp.domain.com
Not even transitional mode helps
$ idn2 -T _xmpp-server._tcp.domain.com
xmpp-server.tcp.domain.com
But older IDN works fine
$ idn --version
idn (GNU Libidn) 1.33
$ idn _xmpp-server._tcp.domain.com
_xmpp-server._tcp.domain.com
I will have have to ask why would it do that.
Another question is whether SRV records should be formatted by libidn2
when they will not be displayed to the user. I think it should affect
only logs but not served names themselves.
Post by Matthias Andree
Simon,
with the release of v2.77, I have switched the FreeBSD port from IDN
(which was used up to and including 2.76) to IDN2, and have just
received a bug report where SRV records that use underscores are no
longer recognized, and the reporter states that disabling the IDN2
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220521
Could you check that?
It appears we're using libidn2 v2.0.2 in FreeBSD, and previously used
libidn 1.33.
Thanks.
Best regards,
Matthias
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Loading...