]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix that dump_cache has a larger buffer for records,
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 3 Jun 2026 12:51:16 +0000 (14:51 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 3 Jun 2026 12:51:16 +0000 (14:51 +0200)
  and it checks that an owner name does not collide with BADRR
  on the input, and changes verbosity on the log of failure in
  rrset to string.  Thanks to Qifan Zhang, Palo Alto Networks,
  for the report.

daemon/cachedump.c
doc/Changelog
util/data/packed_rrset.c

index f0a693bf6f8e2fc04b08d8bd889eef51c03fb6bc..3fc2081d85a739654143c72798407a46df716b04 100644 (file)
@@ -99,7 +99,7 @@ static void
 dump_rrset_line(struct config_strlist_head* txt, struct ub_packed_rrset_key* k,
        time_t now, size_t i)
 {
-       char s[65535];
+       char s[65535*4+2048];
        if(!packed_rr_to_string(k, i, now, s, sizeof(s))) {
                spool_txt_string(txt, "BADRR\n");
                return;
@@ -455,7 +455,7 @@ load_rr(RES* ssl, sldns_buffer* buf, struct regional* region,
        /* read the line */
        if(!ssl_read_buf(ssl, buf))
                return 0;
-       if(strncmp((char*)sldns_buffer_begin(buf), "BADRR\n", 6) == 0) {
+       if(strcmp((char*)sldns_buffer_begin(buf), "BADRR") == 0) {
                *go_on = 0;
                return 1;
        }
index 14f9b0aa417cccf15240f671633d879b1740ed0a..d706448aeb618cfa95bb89560ef14c78a2e5cf96 100644 (file)
        - Fix that validation canonicalization of domain names
          in rdata checks for buffer bounds. Thanks to Qifan Zhang,
          Palo Alto Networks, for the report.
+       - Fix that dump_cache has a larger buffer for records,
+         and it checks that an owner name does not collide with BADRR
+         on the input, and changes verbosity on the log of failure in
+         rrset to string.  Thanks to Qifan Zhang, Palo Alto Networks,
+         for the report.
 
 3 June 2026: Yorgos
        - Fix const as reported by newest compiler warnings.
index 753b494750ee86572fef75f2ca2be12fca660b3d..d28d757611afaf356907c1e62a04a062b20cdba6 100644 (file)
@@ -296,7 +296,7 @@ int packed_rr_to_string(struct ub_packed_rrset_key* rrset, size_t i,
        wlen = (size_t)sldns_wire2str_rr_buf(rr, rlen, dest, dest_len);
        if(wlen >= dest_len) {
                /* the output string was truncated */
-               log_info("rrbuf failure %d %s", (int)d->rr_len[i], dest);
+               verbose(VERB_ALGO, "rrbuf failure %d %s", (int)d->rr_len[i], dest);
                dest[0] = 0;
                return 0;
        }