Bug 53884 - AXFR: Setting dns/allow/transfer=none doesn't work for Samba/AD DCs
AXFR: Setting dns/allow/transfer=none doesn't work for Samba/AD DCs
Status: RESOLVED DUPLICATE of bug 55047
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: 2021-10-08 11:25 CEST by Arvid Requate
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?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Security
Max CVSS v3 score: 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2021-10-08 11:25:52 CEST
Restricting AXFR on UCS Samba/AD DCs seems to be broken. Setting the UCR variable dns/allow/transfer to "none" doesn't have any effect on a Samba/AD DC:

root@primary20:~# ucr get dns/backend
samba4
root@primary20:~# ucr search dns/allow/transfer
dns/allow/transfer: any
 This variable configures which systems may request the DNS zone information using a zone transfer. 'any' allows the transfer for everyone. 'none' denies the zone transfer altogether. Alternatively a list of allowed IP addresses or networks can be defined. In addition an ACL can be defined in /etc/bind/local.conf and referenced in the variable. Multiple entries need to be separated by semicolons. This option only applies when using the LDAP-Backend (see 'dns/backend').

root@primary20:~# ucr set dns/allow/transfer=none
Setting dns/allow/transfer
File: /etc/bind/named.conf.samba4
File: /etc/bind/named.conf.proxy
root@primary20:~# rndc reload    ## was not enough
server reload successful
root@primary20:~# systemctl restart bind9   ## also didn't change the behavior

Still a run of `host -al ucs50domain.net 10.200.8.20` from an external system returns the zone.

Temporarily changing dns/backend to 'ldap' and restarting bind9 shows the intended behavior.

Maybe https://sleeplessbeastie.eu/2021/10/07/how-to-protect-samba-dns-server-against-dns-zone-transfer/ is relevant here. Not sure if this can be fixed by adjusting the UCR template for /etc/bind/named.conf.samba4 or if we need to backport a Samba patch.
Comment 1 Philipp Hahn univentionstaff 2024-03-04 11:00:04 CET

*** This bug has been marked as a duplicate of bug 55047 ***