Bug 44380 - AXFR should be limited to UCS system roles only
AXFR should be limited to UCS system roles only
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: DNS
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-18 10:40 CEST by Nico Gulden
Modified: 2024-03-04 11:00 CET (History)
4 users (show)

See Also:
What kind of report is it?: Security Issue
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017041321000479, 2020022721000477
Bug group (optional): External feedback
Max CVSS v3 score: 5.3 (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N)
hahn: Patch_Available+


Attachments
Limit AXFR (6.83 KB, patch)
2017-04-18 16:23 CEST, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Gulden univentionstaff 2017-04-18 10:40:22 CEST
dig +noall +answer +onesoa +multiline @10.1.0.10 <<DOMAON>> AXFR delivers the whole DNS zone file. This is nice for debugging, but should be limited to UCS domain controler roles. Clients in the network should not be able to perform this action.

See user feedback at Ticket#2017041321000479 for more details.
Comment 1 Philipp Hahn univentionstaff 2017-04-18 16:21:57 CEST
Even worse: UCS does NOT use zone transfer between UCS servers, as they all pull the zone data directly from LDAP; the zone transfer is ONLY used between the LDAP-named and PROXY-named when UCRV dns/backend=ldap is used.
Notifications are still sent, but ignored by the named:
> named[1142]: received control channel command 'reload phahn.qa'
> named[1145]: received control channel command 'reload phahn.qa'

We should drop that 2nd reload from bind.py:213-215, as this duplicated the notify mechanism used between the LDAP-named and PROXY-named.

> named[1145]: zone phahn.qa/IN: Transfer started.
> named[1145]: transfer of 'phahn.qa/IN' from 127.0.0.1#7777: connected using 127.0.0.1#53005
> named[1142]: client 127.0.0.1#53005 (phahn.qa): transfer of 'phahn.qa/IN': AXFR-style IXFR started
> named[1145]: zone phahn.qa/IN: transferred serial 24
> named[1145]: transfer of 'phahn.qa/IN' from 127.0.0.1#7777: Transfer completed: 1 messages, 17 records, 603 bytes, 0.007 secs (86142 bytes/sec)
> named[1145]: zone phahn.qa/IN: sending notifies (serial 24)
> named[1142]: client 127.0.0.1#53005 (phahn.qa): transfer of 'phahn.qa/IN': AXFR-style IXFR ended
> named[1142]: zone phahn.qa/IN: zone serial (24) unchanged. zone may fail to transfer to slaves.
> named[1142]: zone phahn.qa/IN: sending notifies (serial 24)

> named[1145]: client 127.0.0.1#4252: received notify for zone 'phahn.qa'
> named[1145]: zone phahn.qa/IN: notify from 127.0.0.1#4252: zone is up to date
> named[1145]: client 10.200.17.30#49733: received notify for zone 'phahn.qa'
> named[1145]: zone phahn.qa/IN: refused notify from non-master: 10.200.17.30#49733
> named[1145]: client 10.200.17.30#34030: received notify for zone 'phahn.qa'
> named[1145]: zone phahn.qa/IN: refused notify from non-master: 10.200.17.30#34030
> named[1145]: client 10.200.17.7#31415: received notify for zone 'phahn.qa'
> named[1145]: zone phahn.qa/IN: refused notify from non-master: 10.200.17.7#31415

These are the notifies from the PROXY-named on the DC-Master and from both LDAP-/PROXY-named on the DC-Backup;
they are ignored. We should just disable all notifications with
  notify explicit;
and configure an explicit notify between LDAP-named and PROXY-named with
  also-notify {127.0.0.1;};
We probably need to add a new UCRV to make that configurable as some customers use external DNS servers pushed from UCS systems.

See <http://www.zytrax.com/books/dns/ch7/xfer.html#notify>


FYI: As the data in LDAP is not secret, any domain user (student) can pull the DNS data from there even when zone transfers are disabled:
  ldapsearch -Y GSSAPI -b "cn=dns,$(/usr/sbin/ucr get ldap/base)" '(objectClass=dNSZone)' dn
So disallowing the zone transfer does not buy you much.

Nevertheless it should be disabled by default as this is current-best-practice for DNS servers.
Comment 2 Philipp Hahn univentionstaff 2017-04-18 16:23:02 CEST
Created attachment 8780 [details]
Limit AXFR

166d48d27a Bug #44380 DNS: Only notify local PROXY-named
f23e0ea05f Bug #44380 DNS: Limit zone transfers to localhost

TODO: Add new UCRV to configure AXFR from PROXY/SAMBA-named for external NS
Comment 3 Florian Best univentionstaff 2017-06-28 14:53:11 CEST
There is a Customer ID set so I set the flag "Enterprise Customer affected".
Comment 4 Ingo Steuwer univentionstaff 2020-07-03 20:56:35 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
Comment 5 Philipp Hahn univentionstaff 2020-07-05 13:23:54 CEST
At least it should be documented and how to block this.