Bug 2510945 - [c-ares] Rejecting name compression in RDATA where not permitted breaks joining an Samba AD
Summary: [c-ares] Rejecting name compression in RDATA where not permitted breaks joini...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: c-ares
Version: 44
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/cockpit-project/bo...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-08-04 11:09 UTC by Jelle van der Waa
Modified: 2026-08-04 11:13 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jelle van der Waa 2026-08-04 11:09:03 UTC
Cockpit has an integration test for testing if Cockpit can join a domain using SSSD and a separate Samba server.

Since the update to 1.34.7-1.fc44, sssd spits out an DNS related errors. I have figured out that the issue is caused by a commit in c-ares which follows the RFC strictly on parsing name compression in RDATA where not permitted.

A similar issue occurred in the go dns library and the change was reverted as Samba does not follow the RFC 3597. [2]
So in the end this is an issue in Samba but it seems most libraries work around it instead of strictly following the RFC 3597.

I build a version of c-ares with the offending commit reverted and the tests now pass in our CI, the package is available in my copr repo. [3]

[1] https://github.com/c-ares/c-ares/commit/d6eba6933e71ff8d854d39ce46deb511c18a9cc6
[2] https://github.com/golang/go/issues/36718
[3] https://copr.fedorainfracloud.org/coprs/jelly/c-ares/

Reproducible: Always

Steps to Reproduce:
I don't have a standalone reproducer, setting up Samba AD / SSSD is quite a bit of work.
Actual Results:
SSSD fails to resolve the SRV record:

[root@x0 ~]# grep -E "krb5|ldap|kerberos|GSSAPI|bind|fail|error|offline" /var/log/sssd/sssd_cockpit.lan.log | tail -50
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [sss_krb5_touch_config] (0x0080): Unable to change mtime of "/etc/krb5.conf" [13]: Permission denied
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [sss_write_domain_mappings] (0x0200): Mapping file for domain [cockpit.lan] is [/var/lib/sss/pubconf/krb5.include.d/domain_realm_cockpit_lan]
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [sss_krb5_touch_config] (0x0080): Unable to change mtime of "/etc/krb5.conf" [13]: Permission denied
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [ad_cldap_ping_send] (0x0400): Sending CLDAP ping
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [resolv_discover_srv_next_domain] (0x0400): SRV resolution of service 'ldap'. Will use DNS discovery domain 'cockpit.lan'
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [resolv_getsrv_send] (0x0100): Trying to resolve SRV record of '_ldap._tcp.cockpit.lan'
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [resolv_discover_srv_done] (0x0040): SRV query failed [10]: Misformatted DNS reply
(2026-07-22  9:48:23): [be[cockpit.lan]] [ad_cldap_ping_done] (0x0040): Unable to get site and forest information [1432158238]: SRV lookup error
(2026-07-22  9:48:23): [be[cockpit.lan]] [resolve_srv_done] (0x0040): Unable to resolve SRV [1432158238]: SRV lookup error
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [ad_cldap_ping_done] (0x0040): Unable to get site and forest information [1432158238]: SRV lookup error
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [resolve_srv_done] (0x0040): Unable to resolve SRV [1432158238]: SRV lookup error
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [be_resolve_server_process] (0x0080): Couldn't resolve server (SRV lookup meta-server), resolver returned [1432158238]: SRV lookup error
(2026-07-22  9:48:23): [be[cockpit.lan]] [sdap_id_op_connect_done] (0x0040): Failed to connect, going offline (5 [Input/output error])
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [be_resolve_server_done] (0x1000): Server [NULL] resolution failed: [5]: Input/output error
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [sdap_id_op_connect_done] (0x0040): Failed to connect, going offline (5 [Input/output error])
(2026-07-22  9:48:23): [be[cockpit.lan]] [sdap_sudo_refresh_connect_done] (0x0020): SUDO LDAP connection failed [11]: Resource temporarily unavailable
   *  (2026-07-22  9:48:23): [be[cockpit.lan]] [be_mark_offline] (0x2000): Going offline!

Expected Results:
SRV record is resolved.


Note You need to log in before you can comment on or make changes to this bug.