Bug 2585415

Summary: CVE-2026-125633 samba: HINFO type confusion in dns_to_dnsp_convert crashes the AD DC RPC worker [fedora-rawhide]
Product: [Fedora] Fedora Reporter: TEJ RATHI <trathi>
Component: sambaAssignee: Guenther Deschner <gdeschner>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: abokovoy, anoopcs, asn, gdeschner, pfilipen, sbose, ssorce
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["9a09a79c-b336-4f93-ae8e-3bbe322ee90c"]}
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2585340    

Description TEJ RATHI 2026-11-27 11:55:47 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

dns_to_dnsp_convert() in source4/rpc_server/dnsserver/dnsdata.c has no conversion for DNS_TYPE_HINFO. The default arm copies the request union onto the stored union with memcpy() of sizeof(union dnsRecordData).

DnssrvUpdateRecord() and DnssrvUpdateRecord2() call dnsserver_update_record(). An add, which supplies a record and no record to delete, calls dnsserver_db_add_record(). That function calls dns_to_dnsp_convert(), which copies dns->wType onto dnsp->wType and then takes the default arm for HINFO. The request arm is a DNS_RPC_NAME, a length and one string. The stored arm is a dnsp_hinfo, the strings cpu and os. The memcpy does not build those two strings from the name. dnsserver_update_soa() then modifies the zone SOA record. When that modify is allowed, a new name is passed to dnsserver_db_do_add_rec(), and an existing name is pushed later in dnsserver_db_add_record(). Both pushes call ndr_push_dnsp_DnssrvRpcRecord(). The HINFO arm pushes cpu through ndr_push_dnsp_string(), and that function calls strlen() on cpu. An update or a delete also calls dns_to_dnsp_convert(). dns_record_match() returns false for HINFO without reading cpu or os, so those two paths return before the push. This path is the same from samba 4.0.0alpha18 through samba 4.25.1 and on the current master branch.

strlen() on cpu faults the rpc worker process. In the default prefork model the rpc service has its own master and workers, and each worker serves more than one client connection. Those connections end when the process exits. The prefork master starts a replacement worker. The first restart delay is 0. Each later exit of that worker adds the prefork backoff increment to the delay, up to the prefork maximum backoff. Those defaults are 10 seconds and 120 seconds. A caller who repeats the add can exit the rpc workers and leave them stopped for that delay. The ldap and kdc services are separate prefork services.

The caller is authenticated. dcesrv_interface_dnsserver_bind() requires connection integrity, and dcesrv_samdb_connect_as_user() opens the directory as that caller. The add reaches the push only when dnsserver_update_soa() can modify the zone SOA. The default MicrosoftDNS descriptor grants that write to Domain Admins and DnsAdmins. The name being added can be new or already present, and the record type is HINFO.

The flaw is reachable in the default configuration of an AD DC. The dcerpc_dnsserver module is built when the AD DC build is enabled. Provision writes the descriptor named above. The samba process model defaults to prefork, and the default server services list includes rpc.

Introduced in samba 4.0.0alpha18 by commit 8df2ed42cc4662bd385ea34169ebd3bcd4d8bc17 (Amitay Isaacs, 27 September 2011), when the DCERPC DNS server was added. The default memcpy has been in dns_to_dnsp_convert() since that commit. It is present in samba 4.0.0, in samba 4.25.1, and on the current master branch.