From 030eaf9e574d0045265d11638e8cced4861423a7 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 4 May 2021 17:34:58 -0400 Subject: core_dns: skip unknown resource record types --- src/coremods/core_dns.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index b16658242..40de989b6 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -211,7 +211,13 @@ class Packet : public Query break; } default: + { + if (pos + rdlength > input_size) + throw Exception("Unable to skip resource record"); + + pos += rdlength; break; + } } if (!record.name.empty() && !record.rdata.empty()) -- cgit v1.2.3