Bug 1849491 (CVE-2020-10745)

Summary: CVE-2020-10745 samba: Parsing and packing of NBT and DNS packets can consume excessive CPU
Product: [Other] Security Response Reporter: Huzaifa S. Sidhpurwala <huzaifas>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: abokovoy, anoopcs, asn, gdeschner, hvyas, iboukris, iboukris, jrivera, jstephen, lmohanty, madam, puebele, rhs-smb, sbose, security-response-team, ssorce, vbellur
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: samba 4.10.17, samba 4.11.11, samba 4.12.4 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Samba in the way it processed NetBios over TCP/IP. This flaw allows a remote attacker could to cause the Samba server to consume excessive CPU use, resulting in a denial of service. This highest threat from this vulnerability is to system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-02 09:38:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1849492, 1849493, 1849494, 1849495, 1849496, 1849497, 1849498, 1849935, 1853256    
Bug Blocks: 1849490    

Description Huzaifa S. Sidhpurwala 2020-06-22 05:01:20 UTC
As per upstream advisory:

The NetBIOS over TCP/IP name resolution protocol is framed using the same format as DNS, and Samba's packing code for both uses DNS name compression.

An attacker can choose a name which, when the name is included in the reply, causes the DNS name compression algorithm to walk a very long internal list while trying to compress the reply.  This in in part because the traditional "." separator in DNS is not actually part of the DNS protocol, the limit of 128 components is exceeded by including "." inside the components.

Specifically, the longest label is 63 characters, and Samba enforces a limit of 128 components. That means you can make a query for the address with 127 components, each of which is "...............................................................".

In processing that query, Samba rewrites the name in dot-separated form, then converts it back to the wire format in order to reply. Unfortunately for Samba, it now finds the name is just 8127 dots, which it duly converts into over 8127 zero length labels.

Comment 1 Huzaifa S. Sidhpurwala 2020-06-22 05:01:24 UTC

Name: the Samba project

Comment 6 Hardik Vyas 2020-06-30 13:42:22 UTC

This flaw does not affect the version of samba shipped with Red Hat Enterprise Linux and Red Hat Gluster Storage 3  because there is no support for samba as Active Directory Domain Controller.

Comment 11 Huzaifa S. Sidhpurwala 2020-07-02 09:32:49 UTC
External References:


Comment 12 Huzaifa S. Sidhpurwala 2020-07-02 09:33:33 UTC
Created samba tracking bugs for this issue:

Affects: fedora-all [bug 1853256]