You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Malformed cluster token server frames may trigger excessive allocation or corrupt request decoding #3636
The cluster token server decoders trust length and count fields received from the network before fully validating them. A malformed request can declare an oversized Ping namespace length or an invalid ParamFlow parameter count/string length. This may cause excessive allocation, out-of-bounds reads, or leave unread bytes in the current frame.
Describe what you expected to happen
All externally supplied lengths and counts should be validated before allocation or iteration. A structurally invalid frame should be rejected and its connection closed so that no residual bytes can affect a later request.
How to reproduce it (as minimally and precisely as possible)
Start the default cluster token server.
Send a Ping frame whose declared namespace length differs from the bytes remaining, or a ParamFlow frame with a negative/impossible count or string length.
Observe invalid allocation/read behavior or incomplete consumption of the malformed frame.
Verified against the current codebase on branch 1.8. The cluster token server decoders do trust length/count fields from the network before validation:
decodeParam() does not validate that source.readableBytes() >= length before source.readBytes()
NettyRequestDecoder:
Contains // TODO handle decode error here — confirms missing error handling path
Impact: Medium-High — malformed frames from untrusted network peers can cause excessive allocation, OOB reads, or frame corruption affecting subsequent requests on the same connection. Severity: High — affects cluster mode availability and could be exploited for DoS.
Note: PR #3572 by the same author already proposes a fix with regression tests. Maintainers should review that PR.
Verified against the current codebase on branch 1.8. The cluster token server decoders do trust length/count fields from the network before validation:
decodeParam() does not validate that source.readableBytes() >= length before source.readBytes()
NettyRequestDecoder:
Contains // TODO handle decode error here — confirms missing error handling path
Impact: Medium-High — malformed frames from untrusted network peers can cause excessive allocation, OOB reads, or frame corruption affecting subsequent requests on the same connection. Severity: High — affects cluster mode availability and could be exploited for DoS.
Note: PR #3572 by the same author already proposes a fix with regression tests. Maintainers should review that PR.
Activity
oss-sentinel-ai commentedon Aug 6, 2026
Issue Evaluation
Category:
bug| Status: ConfirmedVerified against the current codebase on branch
1.8. The cluster token server decoders do trust length/count fields from the network before validation:PingRequestDataDecoder (
sentinel-cluster-server-default):lengthviasource.readInt()then allocatesnew byte[length]without checkinglength <= source.readableBytes()length>> actual data causesIndexOutOfBoundsExceptionor excessive memory allocationParamFlowRequestDataDecoder (
sentinel-cluster-server-default):amount(param count) and per-paramlengthwithout bounds checkslength→NegativeArraySizeException; oversizedlength→ excessive allocation or OOB readdecodeParam()does not validate thatsource.readableBytes() >= lengthbeforesource.readBytes()NettyRequestDecoder:
// TODO handle decode error here— confirms missing error handling pathImpact: Medium-High — malformed frames from untrusted network peers can cause excessive allocation, OOB reads, or frame corruption affecting subsequent requests on the same connection.
Severity: High — affects cluster mode availability and could be exploited for DoS.
Note: PR #3572 by the same author already proposes a fix with regression tests. Maintainers should review that PR.
Automated evaluation by oss-sentinel-ai
oss-sentinel-ai commentedon Aug 6, 2026
Issue Evaluation
Category:
bug| Status: ConfirmedVerified against the current codebase on branch
1.8. The cluster token server decoders do trust length/count fields from the network before validation:PingRequestDataDecoder (
sentinel-cluster-server-default):lengthviasource.readInt()then allocatesnew byte[length]without checkinglength <= source.readableBytes()length>> actual data causesIndexOutOfBoundsExceptionor excessive memory allocationParamFlowRequestDataDecoder (
sentinel-cluster-server-default):amount(param count) and per-paramlengthwithout bounds checkslength→NegativeArraySizeException; oversizedlength→ excessive allocation or OOB readdecodeParam()does not validate thatsource.readableBytes() >= lengthbeforesource.readBytes()NettyRequestDecoder:
// TODO handle decode error here— confirms missing error handling pathImpact: Medium-High — malformed frames from untrusted network peers can cause excessive allocation, OOB reads, or frame corruption affecting subsequent requests on the same connection.
Severity: High — affects cluster mode availability and could be exploited for DoS.
Note: PR #3572 by the same author already proposes a fix with regression tests. Maintainers should review that PR.
Automated evaluation by oss-sentinel-ai