Shutdown of greater than 10% or equal to but less than 30% of network processing nodes without brute force actions, but does not shut down the network
Description
Brief/Intro
Note - This is an insight report, since there is no option to submit an insight, I am submitting it under low impact, kindly downgrade to insight from low.
Active.ts::ValidateRecordTypes miss out on checking some of the types
Vulnerability Details
In the function Active.ts::ValidateRecordTypes
exportfunctionvalidateRecordTypes(rec:P2P.ActiveTypes.Record):string {let err =validateTypes(rec, { active:'n', activated:'a', activatedPublicKeys:'a', })if (err) return errfor (constitemofrec.activated) {if (typeof item !=='string') return'items of activated array must be strings' }for (constitemofrec.activatedPublicKeys) {if (typeof item !=='string') return'items of activatedPublicKeys array must be strings' }return''}
The above function checks only for active, activated and activatedPublicKeys and their subelements (in case of arrays). The rec: P2P.ActiveTypes.Record type consists of 5 elements. These types are as follows
The issue is fairly simple and is insight, so I am providing only the necessary info for proof of concept.
exportfunctionvalidateRecordTypes(rec:P2P.ActiveTypes.Record):string {@>let err =validateTypes(rec, { // no checking for standby and maxSyncTime active:'n', activated:'a', activatedPublicKeys:'a', })if (err) return errfor (constitemofrec.activated) {if (typeof item !=='string') return'items of activated array must be strings' }for (constitemofrec.activatedPublicKeys) {if (typeof item !=='string') return'items of activatedPublicKeys array must be strings' }return''}
The above function is used by various other functions such as CycleCreator.ts::validateCertsRecordTypes, so it is fairly crucial