#39811 [BC-Critical] inducing large memory allocation via join endpoint
#39811 [BC-Critical] Inducing large memory allocation via /join endpoint
Description
Description
const joinRoute: P2P.P2PTypes.Route<Handler> = {
method: 'POST',
name: 'join',
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
handler: async (req, res) => {
try {
const joinRequest: JoinRequest = Utils.safeJsonParse(Utils.safeStringify(req.body))
// Validate the joinReq against the ajv schema
const errors = verifyPayload(AJVSchemaEnum.JoinReq, joinRequest);
if (errors) {
res.status(400).json({
success: false,
fatal: true,
reason: 'Validation error: ' + errors.join('; ')
});
return
}
.... // more code Proof of Concept
Proof of Concept
Impact
PreviousShardeum Core IIINext#39873 [BC-Critical] Lack of validation of node activation time in `InitRewardTimes` allows to steal rewards
Was this helpful?