Bug 1237258 (CVE-2015-4620)

Summary: CVE-2015-4620 bind: abort DoS caused by uninitialized value use in isselfsigned()
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: green, redhat.bugzilla, security-response-team, tfrazier, thozza, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: BIND 9.9.7-P1, BIND 9.10.2-P2 Doc Type: Bug Fix
Doc Text:
A flaw was found in the way BIND performed DNSSEC validation. An attacker able to make BIND (functioning as a DNS resolver with DNSSEC validation enabled) resolve a name in an attacker-controlled domain could cause named to exit unexpectedly with an assertion failure.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 14:10:49 UTC 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: 1240558, 1240559, 1240910, 1241284, 1241285    
Bug Blocks: 1237259    
Attachments:
Description Flags
bind9-patch-CVE-2015-4620 none

Description Vasyl Kaigorodov 2015-06-30 16:05:27 UTC
It was reported that specially constructed zone data can cause a resolver to crash when validating.

This issue affects BIND versions 9.7.1+.

Patch for versions 9.9.x and 9.10.x is attached to this bug report.

Acknowledgements:

Red Hat would like to thank ISC for reporting this issue.

Comment 1 Vasyl Kaigorodov 2015-06-30 16:06:45 UTC
Created attachment 1044719 [details]
bind9-patch-CVE-2015-4620

Comment 2 Tomas Hoger 2015-07-07 07:48:30 UTC
Vulnerable code was introduced upstream via the following commit, applied between 9.7.0 and 9.7.1:

https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=commitdiff;h=44f175a90a855326725439b2f1178f0dcca8f67d

Therefore, bind packages in Red Hat Enterprise Linux 6 and 7 are affected.

This commit was also backported to bind97 packages in Red Hat Enterprise Linux 5.  The bind packages in Red Hat Enterprise Linux 5 and earlier were not affected.

Comment 6 Tomas Hoger 2015-07-08 06:14:39 UTC
Created bind tracking bugs for this issue:

Affects: fedora-all [bug 1240910]

Comment 7 Tomas Hoger 2015-07-08 14:01:50 UTC
Upstream knowledge base article AA-01267 (linked to in the comment 5 above) notes that this issue affects configuration with DNSSEC validation enabled, i.e. configurations with dnssec-validation configuration option set to "yes" or "auto".  The default named.conf in all affected Red Hat Enterprise Linux bind packages (bind in Red Hat Enterprise Linux 6 and 7, and bind97 in Red Hat Enterprise Linux 5) all set "dnssec-validation yes" by default, and hence are affected by default.

DNSSEC validation can be disabled to mitigate this issues.  However, such mitigation may be undesired where DNSSEC validation is expected to be performed by DNS resolver.

Comment 9 Tomáš Hozza 2015-07-08 14:28:58 UTC
(In reply to Tomas Hoger from comment #7)
> Upstream knowledge base article AA-01267 (linked to in the comment 5 above)
> notes that this issue affects configuration with DNSSEC validation enabled,
> i.e. configurations with dnssec-validation configuration option set to "yes"
> or "auto".  The default named.conf in all affected Red Hat Enterprise Linux
> bind packages (bind in Red Hat Enterprise Linux 6 and 7, and bind97 in Red
> Hat Enterprise Linux 5) all set "dnssec-validation yes" by default, and
> hence are affected by default.
> 
> DNSSEC validation can be disabled to mitigate this issues.  However, such
> mitigation may be undesired where DNSSEC validation is expected to be
> performed by DNS resolver.

Note that disabling DNSSEC validation has potential security implications on its own. By disabling DNSSEC validation you open your resolver to DNS spoofing attacks and other attacks that the plain DNS suffers from.

Comment 10 Tomas Hoger 2015-07-08 22:27:34 UTC
Of course, disabling DNSSEC validation opens up resolution to the classic DNS weaknesses.  That's why it was noted as likely undesired, and why upstream knowledge base also discourages the use of such workaround instead of applying patches.  It should only be considered a short-term mitigation before updates can be deployed.

A possible consideration when evaluating this workaround is which issue has a greater risk of being exploited.  Spoofing attacks against setups with validation disabled would require attacker to be MITM (man in the middle) or able to efficiently predict or guess request ports and transaction IDs.  For issues as this DoS, it should be sufficient for attacker to force resolution of name in a domain they control.  That can be done directly if attacker is allowed to resolve host names via target server, or indirectly by forcing some authorized client to do resolution (e.g. by making users visit attacker controlled web page, or making some network service, such as mail server, resolve attacker supplied name).

Comment 15 Fedora Update System 2015-07-18 01:55:13 UTC
bind-9.10.2-3.P2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 errata-xmlrpc 2015-07-20 16:20:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2015:1443 https://rhn.redhat.com/errata/RHSA-2015-1443.html

Comment 17 Fedora Update System 2015-07-21 08:21:59 UTC
bind-9.9.6-9.P1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 errata-xmlrpc 2015-07-22 09:55:00 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2015:1471 https://rhn.redhat.com/errata/RHSA-2015-1471.html

Comment 22 Tomas Hoger 2015-07-28 09:46:04 UTC
Statement:

This issue did not affect the versions of bind packages as shipped with Red Hat Enterprise Linux 4 and 5. This issue affects the versions of bind97 packages as shipped with Red Hat Enterprise Linux 5.

Red Hat Enterprise Linux 5 is now in Production 3 Phase of the support and maintenance life cycle. This has been rated as having Important security impact and is not currently planned to be addressed in future bind97 packages updates in Red Hat Enterprise Linux 5. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.