Hide Forgot
Description of problem: I am able to add invalid kx dns records. The RFC for KX records is pretty bad, but it looks like a valid KX record will have two values, a priority and a server. The priority should be a 16-bit value (0-65535) I am able to add values less that 0, and greater that 65535 Version-Release number of selected component (if applicable): ipa-server-2.1.1-1.el6.x86_64 How reproducible: always Steps to Reproduce: 1. ipa dnsrecord-add $zone @ --kx-rec "-1 1.2.3.4" 2. ipa dnsrecord-add $zone @ --kx-rec "333383838383 1.2.3.4" Actual results: ipa dnsrecord-add happily created the bad records Expected results: I expect dnsrecord-add to reject the bad values.
Currently, the most DNS records are not validated in ipa-server on RHEL. I have, however, already submitted a patch implementing all these validators (including kx): http://www.redhat.com/archives/freeipa-devel/2011-September/msg00042.html It is targeted for FreeIPA 3.0. If this BZ gets 6.2 ACKs I can backport the patch for RHEL 6.2.
Relevant upstream ticket: https://fedorahosted.org/freeipa/ticket/1106
Fixed upstream: master: efc3e2c1f7a3dcf5e94736395d39e1fa2800a490
This bug still appears present in : ipa-server-2.1.3-9.el6.x86_64 bind-dyndb-ldap-0.2.0-7.el6.x86_64 Maybe I do not have a new enough version of these tools? Also, regarding comment #3, the referenced upstream ticket doesn't seem to relate to this problem. That upstream ticket relates to the behaviour that adding bad records of some types breaks resolution all together. The behaviour in this bug is that when you add a bad kx record, name resolution continues working, but invalid values come out of bind when asked about a kx record.
Improved DNS validation was pushed to master branch only, i.e. this is targeted for upcoming upstream release FreeIPA 3.0 planned for RHEL 6.3. I think comment #3 is correct. The Trac ticket 1106 added improved validation for almost all DNS records, including KX. There will be more major improvements in this area in ticket 2082: https://fedorahosted.org/freeipa/ticket/2082 Broken DNS resolution when a invalid DNS data are saved to a zone are dealt with in Bug 750947 (ticket 2072).
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: ipa-dns-158: Bug 738788 - ipa dnsrecord-add allows invalid kx records :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [08:29:33] :: verifies https://bugzilla.redhat.com/show_bug.cgi?id=738788 ipa: ERROR: invalid 'preference': must be at least 0 :: [ PASS ] :: Running 'ipa dnsrecord-add newzone @ --kx-rec "-1 1.2.3.4" | grep "ipa: ERROR: invalid 'preference': must be at least 0"' ipa: ERROR: invalid 'preference': can be at most 65535 :: [ PASS ] :: Running 'ipa dnsrecord-add newzone @ --kx-rec "333383838383 1.2.3.4" | grep "ipa: ERROR: invalid 'preference': can be at most 65535"' 'fb3c69d4-aff0-43c2-96d5-32beffff0c6d' ipa-dns-158 result: PASS Verified: ipa-server-2.2.0-3.el6.x86_64
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No documentation needed.
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. http://rhn.redhat.com/errata/RHBA-2012-0819.html