mirror of
https://github.com/curl/curl.git
synced 2026-08-26 01:53:31 +03:00
doh: stricter HTTPS RNAME parsing
If any sublabel is longer than 63 octets, abort. This then also catches compression attempts. Verified in test 1658 Reported-by: netspacer.research Closes #22124
This commit is contained in:
parent
e8e3af2abb
commit
ab779d4e4a
3 changed files with 31 additions and 3 deletions
|
|
@ -493,7 +493,26 @@ static CURLcode test_unit1658(const char *arg)
|
|||
"ech:fe80dabbc1ff7eb38a22123456789123|"
|
||||
"ipv6:fe80:dabb:c1ff:fea3:8a22:1234:5678:9123|"
|
||||
"ipv6:ee80:dabb:c1ff:fea3:8a22:1234:5678:9125|"
|
||||
}
|
||||
},
|
||||
{
|
||||
"rname too long label",
|
||||
(const unsigned char *)"\x00\x00" /* 16-bit prio */
|
||||
"\x40"
|
||||
"0123456789012345678901234567890123456789012345678901234567890123"
|
||||
"\x04some\x00", /* RNAME */
|
||||
73,
|
||||
"r:27|",
|
||||
},
|
||||
{
|
||||
"rname long label",
|
||||
(const unsigned char *)"\x00\x00" /* 16-bit prio */
|
||||
"\x3f"
|
||||
"012345678901234567890123456789012345678901234567890123456789012"
|
||||
"\x04some\x00", /* RNAME */
|
||||
72,
|
||||
"r:0|p:0|"
|
||||
"012345678901234567890123456789012345678901234567890123456789012.some.|",
|
||||
},
|
||||
};
|
||||
|
||||
CURLcode result = CURLE_OUT_OF_MEMORY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue