Bug 1791204 (CVE-2019-19344) - CVE-2019-19344 samba: Use after free during DNS zone scavenging in Samba AD DC
Summary: CVE-2019-19344 samba: Use after free during DNS zone scavenging in Samba AD DC
Alias: CVE-2019-19344
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1793406
Blocks: 1790872
TreeView+ depends on / blocked
Reported: 2020-01-15 08:44 UTC by Huzaifa S. Sidhpurwala
Modified: 2021-02-16 20:45 UTC (History)
26 users (show)

Fixed In Version: samba 4.11.5, samba 4.10.12, samba 4.9.18
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in samba. An off-by-default feature to tombstone dynamically created DNS records once they have reached their expiry time contains a use-after-free flaw that allows read memory to be saved back into the database. The highest threat from this vulnerability is to system availability.
Clone Of:
Last Closed: 2020-01-21 09:59:51 UTC

Attachments (Terms of Use)

Description Huzaifa S. Sidhpurwala 2020-01-15 08:44:08 UTC
As per upstream advisory:

Samba 4.9 introduced an off-by-default feature to tombstone dynamically created DNS records that had reached their expiry time.

This feature is controlled by the smb.conf option:
 dns zone scavenging = yes

There is a use-after-free issue in this code, essentially due to a call to realloc() while other local variables still point at the original buffer.

The use is a read, but in quite unlikely conditions (due to NDR validation unpacking the buffer) that read memory might be saved back into the DB.

Comment 1 Huzaifa S. Sidhpurwala 2020-01-15 08:44:11 UTC

Name: the Samba project
Upstream: Christian Naumer

Comment 2 Huzaifa S. Sidhpurwala 2020-01-15 08:44:12 UTC

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

Comment 3 Huzaifa S. Sidhpurwala 2020-01-15 08:44:14 UTC

The code in question is not run in the default configuration, so the workaround is simply to not set
 dns zone scavenging = yes

Comment 4 Huzaifa S. Sidhpurwala 2020-01-21 09:58:13 UTC
External References:


Comment 5 Huzaifa S. Sidhpurwala 2020-01-21 09:59:05 UTC
Created samba tracking bugs for this issue:

Affects: fedora-all [bug 1793406]

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