mirror of
https://github.com/espressif/openthread.git
synced 2026-08-19 08:59:52 +00:00
[network-data] avoid buffer overflow in HandleCommissioningSet() (#4583)
Reject Commissioner Dataset TLVs with extended TLV length.
This commit is contained in:
@@ -206,7 +206,7 @@ void Leader::HandleCommissioningSet(Coap::Message &aMessage, const Ip6::MessageI
|
||||
{
|
||||
MeshCoP::Tlv::Type type;
|
||||
|
||||
VerifyOrExit((cur + 1) <= end && cur->GetNext() <= end);
|
||||
VerifyOrExit(((cur + 1) <= end) && !cur->IsExtended() && (cur->GetNext() <= end));
|
||||
|
||||
type = cur->GetType();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user