]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3121. [security] An authoritative name server sending a negative
authorEvan Hunt <each@isc.org>
Thu, 26 May 2011 23:13:38 +0000 (23:13 +0000)
committerEvan Hunt <each@isc.org>
Thu, 26 May 2011 23:13:38 +0000 (23:13 +0000)
                        response containing a very large RRset could
                        trigger an off-by-one error in the ncache code
                        and crash named. [RT #24650]

CHANGES
lib/dns/ncache.c

diff --git a/CHANGES b/CHANGES
index 1cbae39e10389389832c2fb05b210d79ad6c5e69..d4d6dcce2fa966f6278b05b2367bbeaba09f9c45 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3121.   [security]      An authoritative name server sending a negative
+                        response containing a very large RRset could
+                        trigger an off-by-one error in the ncache code
+                        and crash named. [RT #24650]
 
        --- 9.4-ESV-R5rc1 released ---
 
index 5ee79bfc9ffcfc4a4281786dcac8b1e2aa2b2348..7b1000c37465d25808ed3493b98d404098573d34 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ncache.c,v 1.36.18.8 2010/06/03 23:46:10 tbox Exp $ */
+/* $Id: ncache.c,v 1.36.18.9 2011/05/26 23:13:38 each Exp $ */
 
 /*! \file */
 
@@ -175,7 +175,7 @@ dns_ncache_add(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
                                         */
                                        isc_buffer_availableregion(&buffer,
                                                                   &r);
-                                       if (r.length < 2)
+                                       if (r.length < 3)
                                                return (ISC_R_NOSPACE);
                                        isc_buffer_putuint16(&buffer,
                                                             rdataset->type);