Skip to content

Commit

Permalink
- Fix #20: CVE-2019-13207 Stack-based Buffer Overflow in the
Browse files Browse the repository at this point in the history
  dname_concatenate() function.  Reported by Frederic Cambus.
  It causes the zone parser to crash on a malformed zone file,
  with assertions enabled, an assertion catches it.
  • Loading branch information
wcawijngaards committed Jul 4, 2019
1 parent 35bce05 commit 91102da
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
4 July 2019: Wouter
- Fix #20: CVE-2019-13207 Stack-based Buffer Overflow in the
dname_concatenate() function. Reported by Frederic Cambus.
It causes the zone parser to crash on a malformed zone file,
with assertions enabled, an assertion catches it.

2 July 2019: Wouter
- Tag for 4.2.1rc1

Expand Down
9 changes: 9 additions & 0 deletions doc/RELNOTES
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
NSD RELEASE NOTES

4.2.2 (in development)
================
BUG FIXES:
- Fix #20: CVE-2019-13207 Stack-based Buffer Overflow in the
dname_concatenate() function. Reported by Frederic Cambus.
It causes the zone parser to crash on a malformed zone file,
with assertions enabled, an assertion catches it.


4.2.1
================
FEATURES:
Expand Down
4 changes: 4 additions & 0 deletions zparser.y
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,10 @@ rdata_ipsec_base: STR sp STR sp STR sp dotted_str
if(parser->origin == error_domain) {
zc_error("cannot concatenate origin to domain name, because origin failed to parse");
break;
} else if(name->name_size + domain_dname(parser->origin)->name_size - 1 > MAXDOMAINLEN) {
zc_error("ipsec gateway name exceeds %d character limit",
MAXDOMAINLEN);
break;
}
name = dname_concatenate(parser->rr_region, name,
domain_dname(parser->origin));
Expand Down

0 comments on commit 91102da

Please sign in to comment.