Commit Graph

3297 Commits

Author SHA1 Message Date
Miek Gieben 1e6d260018 Fuzz NewRR
Add checks for token length == 0.
2015-08-07 10:39:21 +01:00
Miek Gieben 9de5f84650 Merge pull request #236 from jdef/serve-wrapper
add interfaces to allow packet-level inspection for pre/post processing
2015-08-07 07:22:22 +01:00
James DeFelice 8255b4a03f update docs; replace "data frame" refs with "raw message" 2015-08-06 17:55:37 -04:00
Miek Gieben e3d247cbf6 Merge pull request #238 from gowthamgts/patch-1
Added Cloudflare to the user list.
2015-08-06 20:36:48 +01:00
Gowtham Gopalakrishnan 87dbfff5f1 Added Cloudflare to the user list.
Read more here: https://blog.cloudflare.com/dns-parser-meet-go-fuzzer/
2015-08-06 23:28:55 +05:30
Miek Gieben 8fdd5c33f8 Merge pull request #237 from FiloSottile/fuzz-rampage
Fuzz rampage!
2015-08-05 07:06:10 +01:00
Filippo Valsorda 4a26a5bbbf EDNS0_SUBNET: refactor netmask handling
Added some more symmetric sanity checks when packing and unpacking, and
simplified the logic a bit, which should still remain mostly unchanged and
incomplete.  A complete implementation of the draft would require context
about whether it's a request or reply and possibly from the request
corresponding to the reply (!£$!@$!) so screw it.
2015-08-05 00:18:02 +01:00
Filippo Valsorda 155118a341 Reject a bad EDNS0_SUBNET family on unpack (not only on pack) 2015-08-05 00:18:02 +01:00
Filippo Valsorda 40484667f4 rewrite NSEC bitmap [un]packing to account for out-of-order 2015-08-05 00:18:02 +01:00
Filippo Valsorda 2b564cd047 UnpackDomainName: fix infinite loop where it would lower 'off'
When a pointer points to a empty name, the "return '.'" special case used to
kick in which is not pointer-aware so it would reset the parsing offset to
the pointer target

This was independently found and fixed in c13d4ee, I'm submitting this patch
anyway as it seems a bit more robust and DRY [citation needed].
2015-08-05 00:18:02 +01:00
Filippo Valsorda 77aa064ef9 packStructValue: rewrite dns:"wks" packing which was writing out of bounds 2015-08-05 00:18:02 +01:00
Filippo Valsorda 0df69faa6e packStructValue: fix a overflow in NSEC packing 2015-08-05 00:18:02 +01:00
Filippo Valsorda b5133fead4 unpackStructValue: drop rdlen, reslice msg instead 2015-08-05 00:18:02 +01:00
Filippo Valsorda 6313235fed unpackStructValue: fix a overflow in opt 2015-08-05 00:18:01 +01:00
James DeFelice e148c23156 add docs and example for DNS frame read/write decorators 2015-08-04 09:04:40 -04:00
James DeFelice e0f83dee9a add interfaces to allow packet-level inspection for pre/post processing 2015-08-04 01:17:14 -04:00
Miek Gieben 16c1d54948 Merge pull request #215 from aaronlehmann/dnssec-invalid-rrset
Check that the RRs passed to Sign and Verify form a valid RFC2181 RRSet
2015-07-29 22:13:04 +01:00
Miek Gieben 2839b93f6b merge conflict 2015-07-28 21:45:20 +01:00
Miek Gieben 3085a49d25 disallow multiple uri fragments 2015-07-28 21:44:50 +01:00
Miek Gieben 9d8cd1bfd9 Test parsing empty target 2015-07-28 07:20:54 +01:00
Miek Gieben b26019349a make dynamic updates work for URI 2015-07-27 22:22:18 +01:00
Miek Gieben 179a68fbec Some small fixes 2015-07-27 22:12:46 +01:00
Miek Gieben 14e381d23e fuzzzz 2015-07-27 21:48:46 +01:00
Miek Gieben fcf516f280 fuzzzz 2015-07-27 20:57:02 +01:00
Miek Gieben c13d4ee9cd domain names: fix compression of root-label
If the root label is compressed (which is 2 bytes, the root label
itself is only 1 byte, so why do it?), go dns incorrectly set the
offset when encountering such a name.

Fixes #234
2015-07-27 20:48:09 +01:00
Miek Gieben e59f851c91 Merge pull request #231 from rolandshoemaker/master
Correct CAA len method and octet packing buffer
2015-07-22 19:55:50 +01:00
Roland Shoemaker 259969e797 Better buffer size 2015-07-21 16:04:21 -07:00
Miek Gieben a34cf6798a Fix URI record
When the URI record became an RFC they slightly changed the format.
Make the needed changes.
2015-07-21 07:47:38 +01:00
Roland Shoemaker eefb8a37ac Merge remote-tracking branch 'upstream/master' 2015-07-20 13:23:13 -07:00
Roland Shoemaker ce1812cfaf Add byte packing/unpacking test 2015-07-20 13:21:13 -07:00
Miek Gieben 3825eda935 Merge pull request #230 from sajal/master
adding TurboBytes Pulse as a user
2015-07-17 16:36:07 +01:00
Sajal Kayan 7bebd64196 adding TurboBytes Pulse as a user 2015-07-17 21:58:41 +07:00
Miek Gieben 63b32eb7eb Merge pull request #229 from rafaeljusto/invalid-idna
change function return behaviour on error
2015-07-17 13:26:08 +01:00
Rafael Dantas Justo c1abafe6ad add final dot in function comment 2015-07-17 07:17:18 -03:00
Rafael Dantas Justo 0ec31bb825 encode function should return nil when an invalid character is detected and
ToPunycode function should return an empty string when there's an invalid
domain name
2015-07-16 13:02:51 -03:00
Miek Gieben dbbb279025 Merge pull request #228 from rafaeljusto/invalid-idna
check label for invalid code points
2015-07-16 13:18:44 +01:00
Rafael Dantas Justo aab9736a4e better name for the file that store the code points list 2015-07-16 08:05:59 -03:00
Rafael Dantas Justo 4071a397d6 drop idna from names as we already are in the idn package and also avoid "else
if" when it's not necessary
2015-07-16 08:05:25 -03:00
Rafael Dantas Justo 0096e2aae0 moving logic from idna_table.go to punycode.go 2015-07-15 16:28:22 -03:00
Rafael Dantas Justo 340d862d2f check label for invalid code points according to RFC 5892, appendix B.1 2015-07-15 15:13:19 -03:00
Roland Shoemaker 3d5407e128 Fix CAA packing bug 2015-07-07 20:20:25 +01:00
Miek Gieben 3e549e2f6f And of course the test too 2015-07-03 09:34:46 +01:00
Miek Gieben 2f503031b0 Rename to ReadMsgHeader
Slightly more descriptive and remove the underscore of _DNSHeaderSize
and call is headerSize.
2015-07-03 09:31:53 +01:00
Miek Gieben 6a8b26eb31 Merge pull request #224 from asergeyev/master
Added function for lazy message reading per #222
2015-07-03 09:24:25 +01:00
Alex Sergeyev b0d6ff308e Fixed things found in code review (comments, semantics). 2015-07-02 22:42:02 -04:00
Alex Sergeyev b625f190ce Not allocating 64K buffers for reading 2015-06-29 08:06:49 -04:00
Alex Sergeyev 53dfadf090 Shortened ReadMsg using ReadMsgBytes, added a constant. 2015-06-28 20:21:37 -04:00
Alex Sergeyev 2f3bcbd506 Added function for lazy message reading per #222 2015-06-28 20:21:37 -04:00
Aaron Lehmann 2cee5e58b0 Rename isValidRRSet to IsRRset, and move it to defaults.go 2015-06-28 17:04:05 -07:00
Aaron Lehmann f605c832f0 Remove isValidRRSet check from RRSIG Sign method
Change suggested by miekg, since the caller may already know it's
passing a proper RRset.

Update unit test to call isValidRRSet directly instead of expecting Sign
to return an error for sets the fail the check.
2015-06-28 16:57:40 -07:00