Knowledge Base ISC Main Website Ask a Question/Contact ISC
CVE-2009-4022: BIND 9 Cache Update from Additional Section
Author: Cathy Almond Reference Number: AA-00931 Views: 2398 Created: 2013-05-23 22:15 Last Updated: 2013-05-23 22:15 0 Rating/ Voters

A validating recursive nameserver may incorrectly cache records from the additional section of a query response. If the nameserver is authoritative-only this will not occur.

Posting date: 
23 Nov 2009
Program Impacted: 
BIND
Versions affected: 
9.0.x, 9.1.x, 9.2.x, 9.3.x, 9.4.0 -> 9.4.3-P4, 9.5.0 -> 9.5.2-P1, 9.6.0 -> 9.6.1-P2 
Severity: 
Medium
Exploitable: 
Remotely

Description:

A nameserver with DNSSEC validation enabled may incorrectly add unauthenticated records to its cache that are received during the resolution of a recursive client query with checking disabled (CD), or when the nameserver internally triggers a query for missing records for recursive name resolution. Cached records can be returned in response to subsequent client queries with or without requesting DNSSEC records (DO). In addition, some of them can be returned to queries with or without checking disabled (CD).

*Severity: Medium (SEVERE for nameservers with DNSSEC validation enabled)

Impact:

This problem only affects nameservers that allow recursive queries and who are performing DNSSEC validation with a trust anchor on behalf of their clients.

The same underlying problem is observed in two slightly different scenarios:

  1. A nameserver with DNSSEC validation enabled may incorrectly add unauthenticated records to its cache from responses received from the additional section, either when processing client queries with checking disabled (CD) or when the nameserver internally triggers a query for missing records for recursive name resolution. 

    These cached unauthenticated records may be returned to subsequent queries with checking disabled (CD), and with or without requesting DNSSEC records (DO).

  2. A nameserver with DNSSEC validation enabled may incorrectly add unauthenticated CNAME or DNAME records to its cache, either when processing client queries with checking disabled (CD) or when the nameserver internally triggers a query for missing records for recursive name resolution.

    CNAME or DNAME records added to cache in this way can be returned in response to a query with or without checking disabled (CD), and with or without requesting DNSSEC records (DO).

Workarounds:

Disabling DNSSEC validation will prevent incorrect caching of records due to this defect. However, this removes DNSSEC validation protection and the ability of the nameserver to deliver authenticated data in query responses.

Active exploits:

None known at this time.

Solution: 

Upgrade BIND to one of the following: 9.4.3-P5, 9.5.2-P2 or 9.6.1-P3. There are no fixes available for BIND versions 9.0 through 9.3, as those releases are at End of Life. Note for BIND 9.7 beta-testers: as earlier fixes were found to be incomplete, all current pre-releases of 9.7.0 are vulnerable. Upcoming releases will include these patches. The three changes below are all required for a complete solution for this problem.

2772. [security] When validating, track whether pending data was from the additional section or not and only return it if validates as secure. (the original bug addressed by this CVE) [RT #20438]

2828. [security] Cached CNAME or DNAME RR could be returned to clients without DNSSEC validation. [RT #20737]

2831. [security] Do not attempt to validate or cache out-of-bailiwick data returned with a secure answer; it must be re-fetched from its original source and validated in that context. (Regression bug introduced by fix for RT #20438) [RT #20819]

Additional information:

There are two additional CVEs relating to this advisory: CVE-2010-0290 & CVE-2010-0382.

Acknowledgements: Michael Sinatra, UC Berkeley, for finding Bug#20438, and Alexander Gall for finding Bug #20737.

Document Revision History:

Nov. 22 - Added VU# for Public Release.
Nov. 23 - Added CVE#
Dec. 2 - Added first paragraph to Impact Statement
Dec. 3 - Revised Workaround& Description
Jan. 19 - Revised Summary, Severity, Description, Workaround, Impact & Solution (earlier fixes incomplete)

Related Documents:

See our BIND Security Matrix for a complete listing of Security Vulnerabilities and versions affected.

If you'd like more information on our Forum or product support please visit www.isc.org/support.

Do you still have questions?  Questions regarding this advisory should go to security-officer@isc.org

Note: ISC patches only currently supported versions. When possible we indicate EOL versions affected.

ISC Security Vulnerability Disclosure Policy:  Details of our current security advisory policy and practice can be found here: https://www.isc.org/security-vulnerability-disclosure-policy

This Knowledge Base article https://kb.isc.org/article/AA-00931 is the complete and official security advisory document.

Legal Disclaimer:
Internet Systems Consortium (ISC) is providing this notice on an "AS IS" basis. No warranty or guarantee of any kind is expressed in this notice and none should be implied. ISC expressly excludes and disclaims any warranties regarding this notice or materials referred to in this notice, including, without limitation, any implied warranty of merchantability, fitness for a particular purpose, absence of hidden defects, or of non-infringement. Your use or reliance on this notice or materials referred to in this notice is at your own risk. ISC may change this notice at any time.  A stand-alone copy or paraphrase of the text of this document that omits the document URL is an uncontrolled copy. Uncontrolled copies may lack important information, be out of date, or contain factual errors.

© 2001-2014 Internet Systems Consortium

Feedback
  • Please help us to improve the content of our knowledge base by letting us know how we can improve this article or by submitting suggestions for other articles you'd like to see created. Information on how to obtain further help on our products or services can be found on our main website.' If you have a technical question or problem on which you'd like help, we recommend searching our community mailing list archives and/or posting your question there (you will need to register there first for your posts to be accepted). The bind-users and the dhcp-users lists particularly have a long-standing and active membership.
Info Submit Feedback on this Article
Nickname: Your Email: Subject: Comment:
Enter the code below:
Quick Jump Menu