BIND 9 Cache Update from Additional Section (updated 19Jan2010)
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).
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.
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.
Acknowledgment:
Michael Sinatra, UC Berkeley, for finding Bug#20438, and Alexander Gall for finding Bug #20737.
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)
Questions should be addressed to bind9-bugs@isc.org


