CVE-2009-4022: BIND 9 Cache Update from Additional Section
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
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)
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:
- 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).
- 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).
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.
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]
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)
See our BIND 9 Security Vulnerability Matrix for a complete listing of Security Vulnerabilities and versions affected.
Do you still have questions? Questions regarding this advisory should go to email@example.com.
ISC Security Vulnerability Disclosure Policy: Details of our current security advisory policy and practice can be found in our Software Defect and Security Vulnerability Disclosure Policy.
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.