Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
2141-Malformed-DNS-RRs-shall-result-in-parse-er...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2141-Malformed-DNS-RRs-shall-result-in-parse-errors.patch of Package erlang
From e61baae9fb990f6456f1f76474cf0851cb5d2a7d Mon Sep 17 00:00:00 2001 From: Alexandre Snarskii <snar@snar.spb.ru> Date: Mon, 23 Aug 2021 13:44:08 +0300 Subject: [PATCH 1/2] Malformed DNS RRs shall result in parse errors --- lib/kernel/src/inet_dns.erl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/kernel/src/inet_dns.erl b/lib/kernel/src/inet_dns.erl index 7a9444ba74..8f63dfdf11 100644 --- a/lib/kernel/src/inet_dns.erl +++ b/lib/kernel/src/inet_dns.erl @@ -500,6 +500,13 @@ decode_data(<<Flags:8,Data0/binary>>, _, ?S_CAA, _) -> orelse throw(?DECODE_ERROR), Value = binary_to_list(Data1), {Flags,inet_db:tolower(Tag),Value}; +%% malformed known RR in inet domain +decode_data(_, in, T, _) when T == ?S_A; T == ?S_AAAA; T == ?S_WKS -> + throw(?DECODE_ERROR); +%% malormed known RR in any domain +decode_data(_, _, T, _) when T == ?S_HINFO; T == ?S_MX; T == ?S_SRV; + T == ?S_NAPTR; T == ?S_URI; T == ?S_CAA -> + throw(?DECODE_ERROR); %% sofar unknown or non standard decode_data(Data, _, _, _) -> Data. -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor