Bug 1388534

Summary: Bind has extra length byte with URI records
Product: Red Hat Enterprise Linux 7 Reporter: Patrick Uiterwijk <puiterwijk>
Component: bindAssignee: Petr Menšík <pemensik>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: medium Docs Contact: Aneta Šteflová Petrová <apetrova>
Priority: high    
Version: 7.2CC: cheimes, fkrska, jreznik, pemensik, psklenar, salmy, snagar, thozza
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: bind-9.9.4-34.el7 Doc Type: Enhancement
Doc Text:
BIND changes the way it handles URI resource records, impacting also URI backward compatibility With this update, the BIND suite no longer adds an additional length byte to a value field when using a URI resource record. This also means that BIND in Red Hat Enterprise Linux (RHEL) 7.4 communicates only in the format described in RFC 7553: https://tools.ietf.org/html/rfc7553. Note that this update makes new URI records incompatible with records created using BIND in previous versions of RHEL. Namely, BIND in RHEL 7.4 cannot: * Understand URI records provided by previous versions of BIND in RHEL. * Serve URI records to clients using previous versions of BIND in RHEL. However, BIND in RHEL 7.4 still can: * Cache and receive records from both earlier and future versions of BIND in RHEL. * Serve records in the old URI format encoded as Unknown DNS Resource Record. See RFC 3597 for details: https://tools.ietf.org/html/rfc3597. After this update, you do not need to make any change to the DNS zone files.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 20:40:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1298243, 1380362, 1393869    

Description Patrick Uiterwijk 2016-10-25 15:04:14 UTC
Description of problem:
When using a URI resource record, bind adds an additional length byte to the value field.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Add a URI type record to the zonefile
2. Query the record

Actual results:
result: 10 1 "Xvalue" where X is the ascii representation of the length byte.

Expected results:
Result: 10 1 "value"

Additional info:
I've heard this happens because https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=commit;h=f1b4e7c31a70f6842bc96f55851cc4e70d7cbe3d is not in RHEL.

Comment 3 Petr Menšík 2016-12-13 19:12:59 UTC
It seems it is more than just cosmetic change. Bind 9.9 uses different format for URI record. More recent resolvers will see one character before, that is not part of URI. However if Bind 9.9 should cache URI record in more recent format, it will always refuse it as invalid, returning always SERVFAIL. That is regression from RHEL6, because older BIND will pass it to clients, even if it does not understand it.

I made a new bug for it https://bugzilla.redhat.com/show_bug.cgi?id=1404412

Comment 5 Petr Menšík 2017-01-19 16:57:08 UTC
Changes supported format of URI record. Recent Bind servers (9.10+) take URI length from record length, do not use first byte as length. That changed since 9.9.6b1, changing URI support from https://www.ietf.org/archive/id/draft-faltstrom-uri-06.txt to https://www.ietf.org/archive/id/draft-faltstrom-uri-08.txt, later assigned as https://datatracker.ietf.org/doc/rfc7553/

It might be possible to support both variants (former 06 and later 08 draft) on the receiving side. But it seems it will not be possible universally for any URI, only for records where I can say for sure it does not use later format. It will always send records to clients in the later format.

Comment 9 Petr Menšík 2017-03-03 13:01:27 UTC
This bug was fixed along with CAA addition on bug #1306610. Even if that was more a mistake, it applied exactly what would fix the former and this bug. The fix is complete.

Comment 19 errata-xmlrpc 2017-08-01 20:40:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.